Disable additional security checks on VBA library references that may refer to unsafe locations on the local machine
Explanation
This policy setting restricts VBA to checking project library references only against the registry and trusted zones. By default VBA performs additional checks against library paths to prevent loading references from potentially unsafe locations on the local machine as well. It is recommended that this setting remain 0 or unset to allow for the more secure default behavior. Only enable this setting if the default behavior is causing compatibility issues with critical solutions, and then, only to provide time to migrate the solutions to address the less secure behavior, at which point the setting should be turned off again.
Registry
HKEY_CURRENT_USER\software\policies\microsoft\vba\security- Value name
disablestrictvbarefssecurity
| 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_DisableStrictVbaRefsSecurityPolicy
$k = 'HKCU:\software\policies\microsoft\vba\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'disablestrictvbarefssecurity' -Value 1 -Type DWordDisable
# Disable: office16/L_DisableStrictVbaRefsSecurityPolicy
$k = 'HKCU:\software\policies\microsoft\vba\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'disablestrictvbarefssecurity' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": office16/L_DisableStrictVbaRefsSecurityPolicy
$k = 'HKCU:\software\policies\microsoft\vba\security'
Remove-ItemProperty -Path $k -Name 'disablestrictvbarefssecurity' -ErrorAction SilentlyContinueApplication
Microsoft 365 Apps / Office (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.