Open in the explorer

Scan encrypted macros in Excel Open XML workbooks

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Microsoft Excel 2016 › Excel Options › Security
Supported on
At least Windows Server 2008 R2 or Windows 7
ADMX file
excel16.admx
Internal name
excel16/L_DeterminewhethertoforceencryptedExcel

Explanation

This policy setting controls whether encrypted macros in Open XML workbooks be are required to be scanned with anti-virus software before being opened.

If you enable this policy setting, you may choose one of these options:

- Scan encrypted macros: encrypted macros are disabled unless anti-virus software is installed. Encrypted macros are scanned by your anti-virus software when you attempt to open an encrypted workbook that contains macros.
- Scan if anti-virus software available: if anti-virus software is installed, scan the encrypted macros first before allowing them to load. If anti-virus software is not available, allow encrypted macros to load.
- Load macros without scanning: do not check for anti-virus software and allow macros to be loaded in an encrypted file.

If you disable or do not configure this policy setting, the behavior will be similar to the "Scan encrypted macros" option.

Registry

HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: excel16/L_DeterminewhethertoforceencryptedExcel
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
#
# Possible options:
#   Scan encrypted macros (default) = 0
#   Scan if anti-virus software available = 1
#   Load macros without scanning = 2
Set-ItemProperty -Path $k -Name 'excelbypassencryptedmacroscan' -Value 0 -Type DWord

Disable

# Disable: excel16/L_DeterminewhethertoforceencryptedExcel
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": excel16/L_DeterminewhethertoforceencryptedExcel
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\security'
Remove-ItemProperty -Path $k -Name 'excelbypassencryptedmacroscan' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
L_DeterminewhethertoforceencryptedExcelDropIDDrop-down listenumexcelbypassencryptedmacroscanREG_DWORD
Default choice (UI): #0
LabelValue
Scan encrypted macros (default)REG_DWORD = 0
Scan if anti-virus software availableREG_DWORD = 1
Load macros without scanningREG_DWORD = 2

Application

Microsoft 365 Apps / Office (Microsoft) — November 2026 templates

Official templates downloaded on November 12, 2026.