Open in the explorer

Block all internet macros (ignore trusted locations or publishers)

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Microsoft Office 2016 › Security Settings
Supported on
At least Windows Server 2016, Windows 10
ADMX file
office16.admx
Internal name
office16/L_BlockMOTWMacroInTrustedOrSigned

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
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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 DWord

Disable

# 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 DWord

Revert 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 SilentlyContinue

Application

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

Official templates downloaded on November 12, 2026.