Ouvrir dans l'explorateur

Disable additional security checks on VBA library references that may refer to unsafe locations on the local machine

Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.

Type
Utilisateur
Chemin GPO
Configuration utilisateur › Stratégies › Modèles d'administration › Microsoft Office 2016 › Paramètres de sécurité EN : User Configuration › Policies › Administrative Templates › Microsoft Office 2016 › Security Settings
Pris en charge sur
At least Windows Server 2016, Windows 10
Fichier ADMX
office16.admx
Nom interne
office16/L_DisableStrictVbaRefsSecurityPolicy

Explication

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.

Registre

HKEY_CURRENT_USER\software\policies\microsoft\vba\security
Nom de la valeur
disablestrictvbarefssecurity
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Activer

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

Désactiver

# Désactiver : 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 DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : office16/L_DisableStrictVbaRefsSecurityPolicy
$k = 'HKCU:\software\policies\microsoft\vba\security'
Remove-ItemProperty -Path $k -Name 'disablestrictvbarefssecurity' -ErrorAction SilentlyContinue

Application

Microsoft 365 Apps / Office (Microsoft) — modèles de novembre 2026

Modèles officiels téléchargés le 12 novembre 2026.