Scan encrypted macros in Excel Open XML workbooks
This per-user `REG_DWORD` value controls whether Excel submits encrypted VBA macros in encrypted or rights-protected Open XML workbooks to compatible antivirus software before loading them.
since 0.9.8.11
Purpose
Show registry keys (1)
HKCU\software\policies\microsoft\office\16.0\excel\security\excelbypassencryptedmacroscan
This per-user REG_DWORD value controls whether Excel submits encrypted VBA macros in encrypted or rights-protected Open XML workbooks to compatible antivirus software before loading them.
The supported value data has the following effects:
0– Encrypted macros must be scanned. Excel disables the macros when compatible antivirus software is unavailable.1– Excel scans the macros before loading them when compatible antivirus software is available. If it is unavailable, Excel may load the macros without that scan.2– Excel does not check for antivirus software and may load the encrypted macros without antivirus scanning.
If the value is absent, the resulting behavior is substantially the same as value 0. This is also the setting used by the Microsoft security baseline.
Notes
Security
Values 1 and especially 2 can permit encrypted macros to be loaded without prior antivirus inspection. If separate macro security controls allow execution, malicious VBA code could consequently run with the signed-in user's permissions without first being examined by the integrated antivirus product.
Value 0 prevents the absence of compatible antivirus software from becoming a path for loading unscanned encrypted macros. The scan depends on the antivirus product supporting the antivirus interface used by Office.
Possible side effects
With value 0, Excel disables encrypted macros if compatible antivirus software is unavailable. Workbook features that depend on those macros will not operate, although this setting does not inherently prevent the workbook itself from opening.
Notes
This value controls only the additional antivirus check for encrypted macros. It neither defines the general VBA macro security level nor changes workbook encryption. Other Excel and Office security policies can still prevent a macro from loading or running.
Microsoft documentation
Microsoft Learn: Microsoft 365 Apps for Enterprise security baseline settings reference
Microsoft Download Center: Administrative Template files for Microsoft Office