How do I connect to a Visio Stencil from Visual Studio

V

Vincent Fournier

I am trying to open a Visio Stencil from Visual Studio so that I can search
the shapes in the stencil and make changes to them. Does anyone have a
snipit on how to make the connection?
 
C

Chris Roth [ Visio MVP ]

Do you already have a connection with Visio? If so, it's any of these:

visApp.Documents.Add(...)
visApp.Documents.Open(...)
visApp.Documents.OpenEx(...)

A stencil is pretty much just another Visio file, only it ends with .vss.

If you don't have a Visio reference, you can start with

Dim appVis as New Visio.Application
Dim appVis as New Visio.InvisibleApp

That should launch Visio for you.

--

Hope this helps,

Chris Roth
Visio MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top