PageID Property [Publisher 2003 VBA Language Reference]
PageID property as it applies to the Hyperlink object.
Returns or sets a Long indicating the page in the publication that is the destination for the specified hyperlink. Read/write.
expression.PageID
expression Required. An expression that returns one of the above objects.
PageID property as it applies to the Page object.
Returns a Long indicating the unique identifier for a page in a publication. Read-only.
expression.PageID
expression Required. An expression that returns one of the above objects.
Remarks
PageID values are random numbers assigned to pages when they are added. These unique numbers do not change when pages are added or deleted. Also, these numbers do not start with 1, nor are they contiguous.
Example
As it applies to the Hyperlink object.
The following example looks at the first hyperlink in the active publication and reports what page it is linked to.
Dim hypTemp As Hyperlink
Dim lngID As Long
Dim strPage As String
Set hypTemp = ActiveDocument.Pages(1).Shapes(1).Hyperlink
lngID = hypTemp.PageID
strPage = ActiveDocument.Pages.FindByPageID(PageID:=lngID).PageNumber
MsgBox "This hyperlink goes to the page " & strPage & "."
As it applies to the Page object.
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
Applies to | Hyperlink Object | Page Object