Ouvrir dans l'explorateur

Allow VBA to load typelib references by path from untrusted intranet locations

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_AllowVbaIntranetRefs

Explication

This policy setting permits VBA to load typelib references by explicit path read from the project data if that path points to an intranet location that is not explicitly in the system trusted sites list.

By default, VBA will attempt to load typelibs referenced in a project by searching for the library GUID in the registry. If it is not found in the registry, VBA will attempt to load the typelib or project reference using the path stored in the project for the reference as long as the reference does not point to an internet or intranet location that is not in the trusted sites list.

If you enable this policy setting, VBA will treat intranet paths like local machine paths, and therefore VBA will attempt to search for unregistered references in intranet locations that are not local machine or in the system's trusted sites list.

If you disable or don’t configure this policy setting, VBA maintains its default behavior and will refuse to load typelibs on intranet paths if it does not find the typelib registered in HKEY_CLASSES_ROOT.

Registre

HKEY_CURRENT_USER\software\policies\microsoft\vba\security
Nom de la valeur
allowvbaintranetreferences
É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_AllowVbaIntranetRefs
$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 'allowvbaintranetreferences' -Value 1 -Type DWord

Désactiver

# Désactiver : office16/L_AllowVbaIntranetRefs
$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 'allowvbaintranetreferences' -Value 0 -Type DWord

Revenir à « Non configuré »

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

Application

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

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