Viewer.PageIDToIndex property (Visio Viewer)

Gets the index of the specified page in the collection of pages in the drawing that is open in Microsoft Visio Viewer. Read-only.

Syntax

expression.PageIDToIndex (PageID)

expression An expression that returns a Viewer object.

Parameters

Name Required/Optional Data type Description
PageID Required Long The ID of the page whose index you want to determine.

Return value

Long

Remarks

The collection of pages is one-based, so the index of the first page in the collection is 1.

If you pass a value for PageID that does not correspond to an actual page ID, the PageIDToIndex property returns 0.

Example

The following code shows how to get the index of the page in the drawing that is open in Visio Viewer and that has ID 0.

Debug.Print vsoViewer.PageIDToIndex(0)

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.