Drawing Control - How to load a stencil

P

Paul Wallis

Hi,
If I set the drawingcontrol.src to a file with a stencil then the stencil
opens correctly with the visio file, whic is great.
Anyone know how to load an additional stencil programatically ???

Cheers,
Paul Wallis
 
M

Mai-lan [MS]

The Visio drawing control is essentially an ActiveX wrapped on the main
Visio library. As such, developers can access the Visio Object Model through
the control for the same programmability as the client application. Use the
Document property on the control to get to the Visio OM and then use the
OpenEx method to open up the stencil of your choice. For sample code on
using OpenEx, check the Visio developer documentation or you can also use
the Macro Recorder to record the action of opening a particular stencil in
the user interface. Here's the macro recorder code emitted for the
Brainstorming template that is opened read-only and docked:
Application.Documents.OpenEx "bstorm_m.vss", visOpenRO + visOpenDocked

Thanks,
Mai-lan
 
Top