HeaderFooter Interface

Represents a single header or footer.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
<GuidAttribute("00020985-0000-0000-C000-000000000046")> _
Public Interface HeaderFooter
'Usage
Dim instance As HeaderFooter
[GuidAttribute("00020985-0000-0000-C000-000000000046")]
public interface HeaderFooter

Remarks

The HeaderFooter object is a member of the HeadersFooters collection. The HeadersFooters collection includes all headers and footers in the specified document section.

Use Headers(index) or Footers(index), where index is one of the WdHeaderFooterIndex constants (wdHeaderFooterEvenPages, wdHeaderFooterFirstPage, or wdHeaderFooterPrimary), to return a single HeaderFooter object.

You can also return a single HeaderFooter object by using the HeaderFooter property with a Selection object.

Note

You cannot add HeaderFooter objects to the HeadersFooters collection.

Use the DifferentFirstPageHeaderFooter property with the PageSetup object to specify a different first page.

Use the OddAndEvenPagesHeaderFooter property with the PageSetup object to specify different odd and even page headers and footers. If the OddAndEvenPagesHeaderFooter property is True, you can return an odd header or footer by using wdHeaderFooterPrimary, and you can return an even header or footer by using wdHeaderFooterEvenPages.

Use the Add method with the PageNumbers object to add a page number to a header or footer.

See Also

Reference

HeaderFooter Members

Microsoft.Office.Interop.Word Namespace