Open templates through VB

S

SoniaChandra

Hi!

I have created a template which includes a background picture and some
settings. I am trying to use this template when I open visio through VB.
When I open this file then any changes I make it seems like it is being made
to my template file.

What is the right way of opening a template? I tried to do the following:

Const TEMPLATEPATH As String = "D:\Visio
Template\SitesAndCableTemplate.vst"
Const SAVENEWFILE As String = "D:\Diagram.vsd"

vApp = New Microsoft.Office.Interop.Visio.Application()

'Create a new document; note the empty string.
vDoc = vApp.Documents.Add("")

vStencil = vApp.Documents.OpenEx(TEMPLATEPATH, 4)

Your help is greatly appreciated.

Thanks,

Sonia
 

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