Custom markup warning
Explanation
This policy setting specifies how Word behaves when opening a document that contains custom XML markup.
If you enable this policy setting, you can set the behavior to one of the following:
- 0: Do not prompt the user and silently remove the custom XML markup.
- 1: Prompt the user regarding the loss of custom XML markup. This is the default option.
- 2: Prompt the user regarding the loss of custom XML markup, and do not allow them to suppress this prompt.
- 3: Prompt the user regarding the loss of custom XML markup, and open the file read-only.
- 4: Prompt the user regarding the loss of custom XML markup, do not allow them to suppress this prompt, and open the file read-only.
- 5: Do not prompt the user and silently remove the custom XML markup, but open the file read-only.
Registry
HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\options- 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: word16/L_CustomMarkupWarning
$k = 'HKCU:\software\policies\microsoft\office\16.0\word\options'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Custom markup warning
# Possible options:
# Do not prompt = 0
# Prompt = 1
# Always prompt = 2
# Prompt and open the file read-only = 3
# Always prompt and open the file read-only = 4
# Do not prompt and open the file read-only = 5
Set-ItemProperty -Path $k -Name 'custommarkupwarning' -Value 1 -Type DWordDisable
# Disable: word16/L_CustomMarkupWarning
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": word16/L_CustomMarkupWarning
$k = 'HKCU:\software\policies\microsoft\office\16.0\word\options'
Remove-ItemProperty -Path $k -Name 'custommarkupwarning' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Custom markup warning:L_CustomMarkupWarningDropID | Drop-down listenum | custommarkupwarning | REG_DWORD | Default choice (UI): #1
|
Application
Microsoft 365 Apps / Office (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.