Are the items in a Window.Selection object always shapes?

Started by Visisthebest, June 15, 2022, 09:46:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

To make sure my code deals with any exceptions I want to understand if there is the possibility that any item in a Window.Selection might be something else than a Visio Shape object.

For instance, Visio users can also use Insert -> Object.

My question is: are those objects always wrapped in a Shape object so a Window.Selection will always contain Shape objects and never any other type?

Is there any other way non-Shape objects can end up as a Window.Selection item?
Visio 2021 Professional

Yacine

The doc (https://docs.microsoft.com/en-us/office/vba/api/Visio.Selection) says clearly: "Represents a subset of Shape objects for a page or master ..."
So, probably yes, only shapes
Yacine

Visisthebest

Visio 2021 Professional