How do I open a new stencil programatically

C

cath1602

I have a visio activeX component in my C# form. I want to open a stencil from
a file.

I can do it with:

VisApp.DoCmd((short)Visio.VisUICmds.visCmdFileOpenStencil);

but this opens a file selection window. I already know the name of the file,
so is there some way I can open it without being prompted?

Catherine
 
C

Chris Roth [ Visio MVP ]

Check out Visio.Documents.Add, .Open, .OpenEx.

The natural assumption is to think of stencils as something different, but
from the Visio Automation perspective, stencils, templates and drawings are
all Documents.

The Visio Developer help has all the details. You can install the help
separately from the Visio 2003 SDK, or it comes along with VBA when you
install Visio.

--

Hope this helps,

Chris Roth
Visio MVP
 
C

cath1602

Thanks Chris
The natural assumption is to think of stencils as something different, but
from the Visio Automation perspective, stencils, templates and drawings are
all Documents.

I'm beginning to figure that out.
The Visio Developer help has all the details. You can install the help
separately from the Visio 2003 SDK, or it comes along with VBA when you
install Visio.

Yes, I have that.

Thanks again.
Catherine
 

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