Disabling activex/macros without notification for automation app

P

Paul

Hi,

I have an application which uses Word/Powerpoint/Excel 2007 for generating
PDF files via automation which works well, using the PDF export plugin.

Occasionally, I have a document with some activex / macros, and have found
that via automation, invoking saveas to pdf can for example cause Word to
enter what seems to be an infinite loop (runs forever with a lot of CPU
consumed with no progress). I can't reproduce this when I perform the
actions manually using the GUI.

I discovered the culprit document had some activex/macro content. I changed
my settings in the Word settings trust centre to unconditionally not run any
activex/macro content and to not notify me about it. Interestingly, this
fixed the problem - automation worked fine on this document again.

Is there a way via automation to unconditionally not run any activex/macro
content wihtout notification?

My application will be installed on a lot of machines, and I'd prefer not to
have to do this security change manually on each machine. Or is there
another way outside of office to set this change?

Thanks in advance for any advice.
 
P

Paul

I don't know if this disables activex controls, but at least setting
Application.AutomationSecurity to msoAutomationSecurityForceDisable is
probably a good start.
 

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