HeaderFooter Property

Applies To

Selection object.

Description

Returns a HeaderFooter object for the specified selection or range. Read-only.

Note An error occurs if the selection isn't located within a header or footer.

See Also

Footers property, Headers property, SeekView property.

Example

This example adds a centered page number to the current page footer.

With ActiveWindow.View
    .Type = wdPageView
    .SeekView = wdSeekCurrentPageFooter
End With
Selection.HeaderFooter.PageNumbers.Add PageNumberAlignment:=wdAlignPageNumberCenter