empty VBA project in stencil

P

Paul Herber

Is it possible to detect and delete an empty VBA project from a
stencil programatically?

Assume I have a stencil object stnObj
What properties/methods do I need to look at>

MTIA.
 
J

JuneTheSecond

Count property to Masters, DeleteFile method to FileSystemObject,, might be
canditates.
 
R

Roger

Hello Paul
To detect if a stencil contains a VBA project, use the
Visio>Tools>Options>Security menu to enable Microsoft Visual Basic for
Applications and set Macro security to high. Visio will then warn when
opening any file containing a VBA project.

The method I've used to delete VBA projects is to copy all the masters into
a new, blank stencil file. Two other methods: using DoCmd(1590) and exporting
to xml, editing out the project section and reloading into Visio are
described in Graham Wideman's "Visio 2003 Developer's Survival Pack" and his
Visio 2002 book. However, I've found problems with these eg the xml option
rotates some shapes.

I hope this helps.
Best regards
Roger Billsdon
 
P

Paul Herber

Thanks very much, June and Roger.
I shall look into this to see what I can get to work. Job for
tomorrow.
 

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