Visio: enable/disable macro warning upon doc open: macro location

J

Jason - Cisco

Visio 2003 Professional -

Opening a document containing macros.

Receive warning to "enable" or "disable" macros.

Situation: you know the document is legitimate, but you are not sure if
there is a macro or not. How do you locate and view the macro source code
that triggered the warning?

I open the document, click "enable" goto Tools->Macros, there are no
macros. So what did I get prompted for if there are no macros? This has
been consistent, repeatable and annoying decision I have to make with 80% of
the documents I receive.

Any ideas on how to make an INFORMED choice instead of random: enable or
disable?
 
J

John

Hi Jason,

The warning is alerting you to any code within the file (or files, perhaps
stencils, that are being called) and not just 'Public' macros. So to check
all the code............

When you've got a document open (and have selected disable), press Alt+F11.
This will open the VBA coding environment (VBE) and on the left you should
see the 'Project Explorer' (if not View/Project Explorer). The Project
Explorer displays a tree view of the open documents and associated modules
and forms (right click and 'View Code' each one to see the code).

Bear in mind that code can also sit behind the 'ThisDocument' node of the
'Visio Objects' folder as well.

Hope that helps.

Best regards

John
 
V

VKY

Jason,

If the creator of the document has enabled "Require variable
declaration" in their VBA, then macros or no macros, you are prompted. I
am sure 100% about this but in my case it is true.

Assuming that 80% of your files are created by yourself and a small
circle of known people. You need to set security to high and ask
everyone to use a digital certificate to sign their documents, to ensure
their authenticity.

The first time you will be asked to enable/disable and if you click
"Always trust macros from this publisher" then you will forever not be
asked again (terms and conditions apply).

For internal use, you need not obtain/buy a digital certificate, but
rather generate one for your own use. You would need to google for
information but this is a good start:

http://www.microsoft.com/technet/prodtechnol/office/office2000/maintain/security/vbamacro.mspx
 

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