[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

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

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
Kelvin4
Asked:
Kelvin4
2 Solutions
 
khairilCommented:
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
 
Visio_GuyCommented:
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
 
Kelvin4Author Commented:
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now