In Excel VBA doing the following
Application.AutomationSecurity = msoAutomationSecurityForceDisable
Call Application.Workbooks.Open("c:\temp\book1.xls", False, True)
Application.AutomationSecurity = msoAutomationSecurityLow
works well for opening the file and disabling the running of any code.
When I do the exact same thing from a scripting language (I'm using AutoIt) I get a COM error trying to set AutomationSecurity. The Workbooks.Open works fine. Setting anything else in the Excel object also seems to work fine -- application.visible, application.caption, application.quit etc.
Is there a way around this, or else to otherwise open a file without triggering code?