PageNumbers Property 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