Table of contents
Collapse the table of content
Expand the table of content

Viewer.SelectShape Method (Visio Viewer)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Selects the specified shape in the drawing that is open in Microsoft Visio Viewer.


expression. SelectShape( ShapeIndex)

_expression_An expression that returns a Viewer object.


NameRequired/OptionalData TypeDescription
ShapeIndexRequiredLongThe index in the collection of shapes of the shape to be selected.

Return Value



The collection of shapes is one-based, so the first shape in the collection has index number 1.

Passing 0 to the SelectShape method deselects the currently selected shape.


The following code selects the shape at index position 2 in the collection of shapes in the drawing that is open in Visio Viewer.

vsoViewer.SelectShape (2)
© 2018 Microsoft