PageIDToIndex Property

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)