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)

Usage

Dim PageNumberAlignment As Object
Dim FirstPage As Object
Dim returnValue As PageNumber
Dim pageNumbers1 As PageNumbers
returnValue = pageNumbers1.Add(PageNumberAlignment, FirstPage)

Syntax

Function Add( _
    <InAttribute()> Optional ByRef PageNumberAlignment As Object, _
    <InAttribute()> Optional ByRef FirstPage As Object _
) As PageNumber
PageNumber Add(
    [In, Optional] ref object PageNumberAlignment, 
    [In, Optional] ref object FirstPage
);
public: PageNumber^ Add(
    &Object^ PageNumberAlignment, 
    &Object^ FirstPage
);
public PageNumber Add(
    /*in*/System.Object PageNumberAlignment, 
    /*in*/System.Object FirstPage
);
function Add(
     PageNumberAlignment : Object, 
     FirstPage : Object
) : PageNumber;

Parameters

  • FirstPage
    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.

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

PageNumbers Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

PageNumbers Members