LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I update Microsoft Office Macro security from LabView during runtime?

Hi!
I am using Report Generation Toolkit and run macros on word report created via LabView. However, all desktops dontt have Macro security set to low and Trusted Pblishers (VB)enabled. Can I change this setting during runtime from LabView? How?
 
Thanks for helping..
Mim
0 Kudos
Message 1 of 4
(2,815 Views)

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

0 Kudos
Message 2 of 4
(2,805 Views)
I agree with your comment on not being able to change security from another application. But wanted to clarify my thoughts from experts on this board.
 
For my test app, when different users log on to run the LabView VI, the app crashes when running macro... becos the security setting for macros under word changes with each user.
 
Thanks for your feedback.
 
Mim
0 Kudos
Message 3 of 4
(2,802 Views)

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.

Message 4 of 4
(2,789 Views)