Getting a Selection Object

Using this syntax obtains the Selection object in the currently active window in Visio:

Set selObj = Visio.ActiveWindow.Selection

In this syntax, selObj is the object reference to the Shapes selection object. Visio.ActiveWindow.Selection is the concatenated object reference chain to the Shapes selection object.

Remember that the Selection property of a Window object is only valid for a drawing window. The Selection object is similar to the Shapes collection object in that it has both an Item and a Count property. The order of the Shape objects within the Selection collection object reflects the order that the Shape objects were selected in the diagram. It does not include Visio SmartShape symbols that were subselected ...

Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.