Block all internet macros (ignore trusted locations or publishers)
Explanation
This policy setting removes the trusted location and trusted publisher exceptions for files downloaded from the internet with Mark of the Web (MOTW).
By default, Office blocks macros from the internet but allows exceptions for files that are either in trusted locations or signed by trusted publishers.
If you enable this policy setting, all macros in files downloaded from the internet will be blocked, including those in trusted locations or signed by trusted publishers. This provides maximum protection against internet-based macro threats.
If you disable or don't configure this policy setting, the default behavior applies where macros from the internet are blocked except when the file is in a trusted location or signed by a trusted publisher.
Use cases
Removes the usual exceptions for Office files downloaded from the internet (marked with Mark of the Web): by default Office blocks their VBA macros, unless the file is in a trusted location or the macro is signed by a trusted publisher. When enabled, the policy blocks all those macros, including these, which gives the maximum protection against internet-borne macros.
It therefore breaks signed business workbooks that arrive by email or download. Note also that Office blocks macros in files on network shares outside the Local intranet zone or trusted sites (for example opened by IP address): they will be affected.
Microsoft source: Macros from the internet are blocked by default in Office
Registry
HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\common\security- Value name
blockmotwmacrointrustedorsigned
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
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: office16/L_BlockMOTWMacroInTrustedOrSigned
$k = 'HKCU:\software\policies\microsoft\office\16.0\common\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'blockmotwmacrointrustedorsigned' -Value 1 -Type DWordDisable
# Disable: office16/L_BlockMOTWMacroInTrustedOrSigned
$k = 'HKCU:\software\policies\microsoft\office\16.0\common\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'blockmotwmacrointrustedorsigned' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": office16/L_BlockMOTWMacroInTrustedOrSigned
$k = 'HKCU:\software\policies\microsoft\office\16.0\common\security'
Remove-ItemProperty -Path $k -Name 'blockmotwmacrointrustedorsigned' -ErrorAction SilentlyContinueApplication
Microsoft 365 Apps / Office (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.