Viewer.ShapeIndexToID property (Visio Viewer)
Gets the ID of the shape at the specified index position in the collection of shapes in the drawing that is open in Microsoft Visio Viewer. Read-only.
Syntax
expression.ShapeIndexToID (ShapeIndex)
expression An expression that returns a Viewer object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
ShapeIndex | Required | Long | The index position of the shape in the collection of shapes. |
Return value
Long
Remarks
The collection of shapes in Visio Viewer is one-based, so the first shape in the collection is at index position 1.
Example
The following code gets the ID of all the shapes in the drawing that is open in Visio Viewer.
Dim intCounter As Integer
For intCounter = 1 To Viewer1.ShapeCount
Debug.Print Viewer1.ShapeIndexToID(intCounter)
Next intCounter
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.