Selecting a Master shape to drop
A Master object must be obtained before it can be dropped onto a page using code. Simply knowing the name of a desired Master is not enough because the Master may not exist in the Document Stencil yet. Also, there may be more than one Master with the same name on any opened stencil, so the stencil name may also be required. In fact, the active Document may have a number of docked stencils, so they should be checked first. Then, the Visio Application may have a number of different stencil documents open. Lastly, the stencil may not even be open in Visio, so the stencil may need to be opened, but that is left for the accompanying code for this book.
The caption that appears on the header bar of a stencil is either ...
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.