Open a visio stencil with vba

M

Mikkan

Hi. Im having a problem with visio stencils. A year ago a made a program
which draws in visio and it worked fine. Now I should use the program on a
different computer and when a start the program it complains at this row:
Set stnObj = appVisio.Documents("Fundamental Items.vss")
where stnObj is of type Visio.Document.
I suppose the program cant find the stencil, but where does visio look for
stencils. I also open a template, at beginning the program complained of the
row where the template should be opened so I cresated a new template and put
it in the right folder (which I thought) and it stopt complaining. Then I
moved the stencil there to, but I doesnt seem to find it. What to do? I dont
think it is something wrong with the code it worked perfectly fine a year
ago. I just need to find where to save the stencil how do I do that?
 
A

Al Edlund

since you've left out things like whether the visios on the two systems are
the same (or what the versions are), you might consider just hardcoding a
path into your open stencil i.e. "c:\my_prog\Fundamental Items.vss"
al
 
J

JuneTheSecond

You might check the stencil is in the Visio's standard folder, that is
personal
stencil folder, or you might check if the file path setting for stencil is
not lost
with the menu "Tool", "Option", "Detail", "File Path".
 

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