Adding Callouts to shapes

There is a built-in stencil called Callouts in the Visio Extras category, but the Callouts introduced as part of Structured Diagram API are something different. These are a special type of Shape that have some programmatic control. Any shape can have many Callouts associated with it. The names of Callout Masters in the built-in stencil can be read by moving the mouse over them in the Insert | Diagram Parts | Callout drop-down gallery, as in the following screenshot:

Adding Callouts to shapes

The following code, AddCallouts(), gets a reference to the Thought Bubble callout from the built-in stencil. It then loops through all the shapes in the active ...

Get Mastering Data Visualization with Microsoft Visio Professional 2016 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.