Modifica

Condividi tramite


HeaderFooter Interface

Definition

Represents a single header or footer.

public interface class HeaderFooter
[System.Runtime.InteropServices.Guid("00020985-0000-0000-C000-000000000046")]
public interface HeaderFooter
type HeaderFooter = interface
Public Interface HeaderFooter
Attributes

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(Object, Object) method with the PageNumbers object to add a page number to a header or footer.

Properties

Application

Returns a Application object that represents the Microsoft Word application.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

Exists

True if the specified HeaderFooter object exists.

Index

Returns a WdHeaderFooterIndex constant that represents the specified header or footer in a document or section.

IsHeader

True if the specified HeaderFooter object is a header.

LinkToPrevious

True if the specified header or footer is linked to the corresponding header or footer in the previous section. When a header or footer is linked, its contents are the same as in the previous header or footer.

PageNumbers

Returns a PageNumbers collection that represents all the page number fields included in the specified header or footer.

Parent

Returns an object that represents the parent object of the specified object.

Range

Returns a Range object that represents the portion of a document that's contained in the specified object.

Shapes

Returns a Shapes collection that represents all the Shape objects in the specified header or footer. This collection can contain drawings, shapes, pictures, OLE objects, ActiveX controls, text objects, and callouts.

Applies to