Compartilhar via


PageNumbers.ShowFirstPageNumber Property

Word Developer Reference

True if the page number appears on the first page in the section. Read/write Boolean.

Syntax

expression.ShowFirstPageNumber

expression   An expression that returns a PageNumbers collection object.

Remarks

Setting this property to True automatically adds page numbers to a section.

Example

This example checks to see whether the page number appears on the first page in the active document.

Visual Basic for Applications
  Set myDoc = ActiveDocument
first = myDoc.Sections(1).Headers(wdHeaderFooterPrimary). _
    PageNumbers.ShowFirstPageNumber
Msgbox "This document shows numbers on the first page - " & first

This example adds page numbers to the active document.

Visual Basic for Applications
  ActiveDocument.Sections(1) _
    .Headers(wdHeaderFooterPrimary).PageNumbers _
    .ShowFirstPageNumber = True

See Also