The AutomationSecurity property behavior has changed in Office 2003
SYMPTOMSWhen you try to open a workbook file in Microsoft Office
Excel 2003 that contains a macro that opens another workbook file, you may
experience the following symptoms:
CAUSEThis issue occurs because the behavior of the AutomationSecurity property has changed in Microsoft Office 2003. MORE INFORMATIONBy default, in Office 2003 the AutomationSecurity property is set to low. In Microsoft Office XP, you can run a
macro to open a workbook even though the AutomationSecurity property is set to the ForceDisable value, or if the macro
security is set to medium. However, if you use the ForceDisable value in Excel
2003, XLM macros are disabled. If you configure the AutomationSecurity property to the ByUI value in Excel 2003, and the macro security is set to medium, you will receive a message that prompts you to enable or to disable macros in the workbook. If you configure the AutomationSecurity property to the ByUI value, and macro security is set to high, VBA and XLM labels are automatically disabled. However, workbooks that contain XLM ply macros will not open. Note The AutomationSecurity property overrides the security that is set in the user interface. To determine the macro security in the user interface (UI), on the Tools menu, point to Macro, and then click Security. The following table provides an overview of the behavior of the AutomationSecurity property in Excel 2003:
The AutomationSecurity propertyThe Application object of Microsoft Word, Microsoft Excel, and Microsoft PowerPoint supports this property.The AutomationSecurity property returns or sets an MsoAutomationSecurity value that represents the security mode that an Office 2003 program uses when it programmatically opens files. This property is automatically set to a value of MsoAutomationSecurityLow when the program starts. Therefore, to avoid breaking solutions that rely on the default setting, reset this property to the MsoAutomationSecurityLow value after you open a file programmatically. Also, make sure that you set this property immediately before and after you open a file programmatically to avoid malicious subversion. The AutomationSecurity property also permits macros to choose to open a document and to trigger the appropriate security warning. This action is the same as if an end user is manually opening the document. This new property does not affect the behavior when the end user uses the user interface (UI) to open files. In this scenario, this property does not change the settings in the Security dialog box (on the Tools menu, point to Macro, and then click Security). You can choose from the following MsoAutomationSecurity values:
The value of the DisplayAlerts property does not apply to security warnings. For example, if the following conditions are true, security warnings appear while the macro is running:
You can use the following values for the DisplayAlerts property:
STATUSThis behavior is expected in the Microsoft products that are
listed in the "Applies to" section.
| Article Translations
|

Back to the top
