Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.42 KB

Publisher.Page.PageIndex.md

File metadata and controls

53 lines (34 loc) · 1.42 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Page.PageIndex property (Publisher)
vbapb10.chm393224
vbapb10.chm393224
Publisher.Page.PageIndex
f64cc275-0474-7b97-d840-22e1e576d6f5
06/11/2019
medium

Page.PageIndex property (Publisher)

Gets the index of the page in the Pages collection of the active document. Read-only.

Syntax

expression.PageIndex

expression A variable that represents a Page object.

Remarks

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.

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 
 

[!includeSupport and feedback]