_Application.AutomationSecurity Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns or sets a MsoAutomationSecurity constant that represents the security setting Microsoft Word uses when programmatically opening files.
public:
property Microsoft::Office::Core::MsoAutomationSecurity AutomationSecurity { Microsoft::Office::Core::MsoAutomationSecurity get(); void set(Microsoft::Office::Core::MsoAutomationSecurity value); };
public Microsoft.Office.Core.MsoAutomationSecurity AutomationSecurity { get; set; }
member this.AutomationSecurity : Microsoft.Office.Core.MsoAutomationSecurity with get, set
Public Property AutomationSecurity As MsoAutomationSecurity
Property Value
Remarks
The default setting of the AutomationSecurity property is msoAutomationSecurityLow. Therefore, to avoid changing the users' security settings or breaking solutions that rely on the default setting, you should be careful to set this property back to its original setting after programmatically opening a file.
Setting ScreenUpdating to False does not affect alerts and will not affect security warnings. The DisplayAlerts setting will not apply to security warnings. For example, if the user sets DisplayAlerts equal to False and AutomationSecurity to msoAutomationSecurityByUI, while the user is on Medium security level, then there will be security warnings while the macro is running. This allows the macro to trap file open errors while still showing the security warning if the file open succeeds.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應