Solved

? Suppress Microsoft Security alerts when automating in visio:  OpenEx(path\myfilename.vss)

Posted on 2011-09-18
3
683 Views
Last Modified: 2012-06-27
Hi, I am automating a visio procedure which includes:

Set docRuleStencil = Visio.Documents.OpenEx(myPath\myFilenane ".vss", visOpenDocked + visOpenCopy)

This line --> security alert notice "enable or disable macro"s, andh cites the filepath above.

I think I'd like to suppress this message because I know the .vss file I'm calling, and I dont want the user worried by warnings. I'd like to turn the warning back on when the .vss has been opened.

Is this approach good practice for an application that is to be used by several/many people, not all under my control? ... and how do I  effect it in my VBA procedure?

Thanks
Kelvin4
0
Comment
Question by:Kelvin4
3 Comments
 
LVL 13

Accepted Solution

by:
khairil earned 450 total points
ID: 36556738
Hi,

If your use run on Active Directory, you can turn off security option for Microsoft Office product using group policy, http://technet.microsoft.com/en-us/library/ff400327.aspx

Other way you have to configure every client computer to allow access on VBA macro, http://office.microsoft.com/en-us/visio-help/enable-or-disable-macros-in-office-documents-HA010031071.aspx

The best way is, if you have valid certificate from CA then use it, your VBA apps will have no problem with MS Office security anymore. GoDaddy have cheaper cert compare to other, http://www.godaddy.com/ssl/code-signing-certificate.aspx?ci=13314 but you are free to find much more lower price tag, but be sure they support Code Signing.

If you like to generate you own cert to sign the document then follow this article, http://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows

Then import the pfx file generated using above article to other computer to trust your cert. Personally I not trying it yet, but by experience with SSL Cert (SSL cert is different compare to Code Signing Cert) it can be done.
0
 
LVL 11

Assisted Solution

by:Visio_Guy
Visio_Guy earned 50 total points
ID: 36559284
Hi Kelvin,

Sounds like the stencil you are opening has VBA macros in it. Do you want them to be available? If not, you could use the visOpenMacrosDisabled flag with OpenEx and avoid the warnings.
0
 

Author Closing Comment

by:Kelvin4
ID: 36566002
Hi khairil and Visio Guy:

Thanks for giving me a good view of this issue.
khairi: Just what I needed!
visio guy: Good to know about the openEx flag. The shapes on the Stencil I was calling provide shapesheet data to subsequent macro procedures, but do not themselves CALL any procedures. Nonetheless, the flags stopped all my current macros, so that option is closed to me.
Best regards,
Kelvin
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now