Enable Minimizing VBA Project Digital Signature Invalidation
Explanation
This policy setting allows you to reduce the number of actions in Office that will result in a document's VBA digital signature becoming invalidated.
The VBA project may be modified in certain ways that change the project storage but that do not invalidate the source code digital signature. With this setting turned off, these actions will lead to the VBA digital signature being invalidated, and the signature dropped on save if the user does not have the private key available to resign.
With this setting on, we will only perform a resign of the project if the source code signature has changed, and will keep the existing signature in other cases. If the VBA project storage is changed and saved, but the old signature retained under this feature, this can lead to an invalidation of the saved compiled VBA project state. If this happens, the VBA project will be forced to recompile each time the document is loaded. This may have negative performance impacts for larger VBA projects. Once a document is in this state, the state will persist until the VBA project is resigned.
Registry
HKEY_CURRENT_USER\software\policies\microsoft\vba\security- Value name
minimizevbaresign
| 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_EnableMinimizeVbaResigning
$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 'minimizevbaresign' -Value 1 -Type DWordDisable
# Disable: office16/L_EnableMinimizeVbaResigning
$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 'minimizevbaresign' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": office16/L_EnableMinimizeVbaResigning
$k = 'HKCU:\software\policies\microsoft\vba\security'
Remove-ItemProperty -Path $k -Name 'minimizevbaresign' -ErrorAction SilentlyContinueApplication
Microsoft 365 Apps / Office (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.