HeaderFooter.PageNumbers Property (Word)

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

Syntax

expression .PageNumbers

expression An expression that returns a HeaderFooter object.

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example creates a new document and adds page numbers to the footer.

Set myDoc = Documents.Add 
With myDoc.Sections(1).Footers(wdHeaderFooterPrimary) 
 .PageNumbers.Add PageNumberAlignment := wdAlignPageNumberCenter 
End With

See Also

Concepts

HeaderFooter Object

HeaderFooter Object Members