Page.PageID property (Publisher)

Returns a Long indicating the unique identifier for a page in a publication. Read-only.

Syntax

expression.PageID

expression A variable that represents a Page object.

Remarks

PageID values are random numbers assigned to pages when they are added. These unique numbers don't change when pages are added or deleted. Also, these numbers don't start with 1, nor are they contiguous.

Example

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.