01-10-2007 11:45 AM
01-10-2007 01:29 PM
I don't think there's a way to do this. Being able to change the global security settings of an application programmatically from another application would in and of itself be a huge security flaw.
I noticed a property of the Word.Application class called "AutomationSecurity", but it didn't seem to change when I modified the macro security settings in Word. I tried all of this with Word XP, so I'm not sure if there's any additional interface to these settings in Office 2003 or 2007, but again, I would assume not, for the previously-mentioned security reasons.
-D
01-10-2007 01:33 PM
01-10-2007 02:49 PM
The security settings are there to prevent a macro from running malicious code. If a macro could turn off the security to allow itself to run, there would be a huge security flaw.
My only suggestion is that you set the security level when you install the program, or instruct whoever is installing it to do so.