Set document behavior if file validation fails
Explanation
This policy setting controls how Office handles documents when they fail file validation.
If you enable this policy setting, you can configure the following options for files that fail file validation:
- Block files completely. Users cannot open the files.
- Open files in Protected View and disallow edit. Users cannot edit the files. This is also how Office handles the files if you disable this policy setting.
- Open files in Protected View and allow edit. Users can edit the files. This is also how Office handles the files if you do not configure this policy setting.
If you disable this policy setting, Office follows the "Open files in Protected View and disallow edit" behavior.
If you do not configure this policy setting, Office follows the "Open files in Protected View and allow edit" behavior.
Registry
HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\word\security\filevalidation- 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_SetDocumentBehaviorIfFileValidationFails
$k = 'HKCU:\software\policies\microsoft\office\16.0\word\security\filevalidation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
#
# Possible options:
# Block files = 0
# Open in Protected View = 1
Set-ItemProperty -Path $k -Name 'openinprotectedview' -Value 1 -Type DWord
# Checked: Allow edit. Unchecked: Do not allow edit.
# unchecked: 1
Set-ItemProperty -Path $k -Name 'disableeditfrompv' -Value 0 -Type DWordDisable
# Disable: word16/L_SetDocumentBehaviorIfFileValidationFails
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": word16/L_SetDocumentBehaviorIfFileValidationFails
$k = 'HKCU:\software\policies\microsoft\office\16.0\word\security\filevalidation'
Remove-ItemProperty -Path $k -Name 'openinprotectedview' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'disableeditfrompv' -ErrorAction SilentlyContinueOptions (2)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| L_SetDocumentBehaviorIfFileValidationFailsDropID | Drop-down listenum | openinprotectedview | REG_DWORD | Default choice (UI): #1
| ||||||
| Checked: Allow edit. Unchecked: Do not allow edit.L_SetDocumentBehaviorIfFileValidationFailsStr3 | Check boxboolean | disableeditfrompv | REG_DWORD | Checked: REG_DWORD = 0Unchecked: REG_DWORD = 1 |
Application
Microsoft 365 Apps / Office (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.