Share via


PageNumbers.Add Method

Returns a PageNumber object that represents page numbers added to a header or footer in a section.

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

Syntax

'Declaration
Function Add ( _
    ByRef PageNumberAlignment As Object, _
    ByRef FirstPage As Object _
) As PageNumber
'Usage
Dim instance As PageNumbers
Dim PageNumberAlignment As Object
Dim FirstPage As Object
Dim returnValue As PageNumber

returnValue = instance.Add(PageNumberAlignment, _
    FirstPage)
PageNumber Add(
    ref Object PageNumberAlignment,
    ref Object FirstPage
)

Parameters

  • FirstPage
    Type: System.Object%
    Optional Object. False to make the first-page header and the first-page footer different from the headers and footers on all subsequent pages in the document. If FirstPage is set to False, a page number isn't added to the first page. If this argument is omitted, the setting is controlled by the DifferentFirstPageHeaderFooter property.

Return Value

Type: Microsoft.Office.Interop.Word.PageNumber

Remarks

If the LinkToPrevious property for the HeaderFooter object is set to True, the page numbers will continue sequentially from one section to next throughout the document.

See Also

Reference

PageNumbers Interface

PageNumbers Members

Microsoft.Office.Interop.Word Namespace