Viewer.CurrentPageIndex property (Visio Viewer)

Gets or sets the index of the page displayed when a drawing opens in Microsoft Visio Viewer. Read/write.

Syntax

expression.CurrentPageIndex

expression An expression that returns a Viewer object.

Return value

Long

Remarks

Set the CurrentPageIndex value to the index of the page in the Visio drawing that you want to display. For example, to display Page-1, set the value to 1. If you don't specify a page index or if you set the value to 0, Visio Viewer displays the same page that was displayed the last time you saved the drawing.

If no drawing is loaded in Visio Viewer, the CurrentPageIndex value is 0.

If the DocumentLoaded property value is True, the CurrentPageIndex value must be between 1 and the value of the PageCount property; if you set the property to a value that represents a nonexistent page, Visio Viewer ignores the setting.

Example

The following code gets the index of the page displayed in Visio Viewer when a drawing opens.

 Debug.Print vsoViewer.CurrentPageIndex

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.