Getting Object Type Information

When you are accessing objects in a Visio diagram through Automation you might be accessing any number of differing objects. These objects might be SmartShape symbols, they might be grouped SmartShape symbols, they might be guides, they might be imported graphics, or they might be other foreign objects. Some might be linked or embedded into a Visio diagram.

You need to understand what type of object you are dealing with when you are iterating through a collection of objects. To that end, a Shape object's Type property returns the type of object under scrutiny. Listing 17.4 allows the user to select anything on the page. It then returns the type of object selected as text in a message box. This code uses a simple ...

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.