Page.PageIndex property (Publisher)
Gets the index of the page in the Pages collection of the active document. Read-only.
expression A variable that represents a Page object.
A PageIndex property value is assigned to each page when it is added, and the value is incremented for each additional page. When pages are added or deleted, page index numbers are reassigned such that the first page is always 1 and the page index numbers always increment by 1.
For example, in a publication with five pages, the page index numbers will be 1 through 5, regardless of the page number displayed on the pages themselves.
The following example displays the PageIndex, PageNumber, and PageID properties for all the pages in the active publication.
Dim lngLoop As Long With ActiveDocument.Pages For lngLoop = 1 To .Count With .Item(lngLoop) Debug.Print "PageIndex = " & .PageIndex _ & " / PageNumber = " & .PageNumber _ & " / PageID = " & .PageID End With Next lngLoop End With
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.