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
 
Top