Scan encrypted macros in Word Open XML documents
This per-user registry value determines whether Word requires encrypted VBA macros in Word Open XML documents to be scanned by antivirus software before they are loaded.
since 0.9.8.11
Purpose
Show registry keys (1)
HKCU\software\policies\microsoft\office\16.0\word\security\wordbypassencryptedmacroscan
This per-user registry value determines whether Word requires encrypted VBA macros in Word Open XML documents to be scanned by antivirus software before they are loaded. It is a REG_DWORD value with the following supported data:
0– Scan encrypted macros: Word loads encrypted macros only when they can be scanned by antivirus software. Otherwise, the macros remain disabled.1– Scan if antivirus software is available: When compatible antivirus software is available, it scans the encrypted macros before Word loads them. If no antivirus software is available, Word can load the macros without a scan.2– Load macros without scanning: Word loads encrypted macros without requiring an antivirus scan.
This setting governs the antivirus scan performed before encrypted macros are loaded. It does not by itself authorize macro execution; the other macro security settings in Word continue to determine whether loaded VBA code may run.
Notes
Security
A value of 0 prevents encrypted VBA code from bypassing the pre-load antivirus check. This matters because macro code stored inside an encrypted document cannot ordinarily be inspected until the protected content has been decrypted.
Values 1 and 2 reduce this protection. With 1, encrypted macros can be loaded without inspection when suitable antivirus software is unavailable. With 2, the antivirus check is bypassed even when security software is present. Malicious VBA code can therefore remain undetected and might run if the applicable macro security rules permit execution.
Possible side effects
With a value of 0, macro-dependent features in an encrypted document are unavailable when Word cannot obtain a compatible antivirus scan. This can affect legitimate documents whose functionality depends on VBA macros.
Notes
The value applies only to Word and to encrypted macros in Word Open XML documents. It does not replace general VBA macro policies or other controls such as Trusted Locations, Protected View, or blocking macros in files obtained from the Internet.
Microsoft uses the Office 16.0 registry branch for Microsoft 365 Apps and supported Windows desktop releases of Office 2016, Office 2019, and Office LTSC.
Microsoft documentation
Microsoft Learn: Microsoft 365 Apps for Enterprise security baseline settings reference
Microsoft Office 2010 Security Planning: Change how encrypted VBA macros are scanned for viruses
Microsoft Download Center: Administrative Template files for Microsoft Office