en-US office user

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

Verified with Microsoft 365/Office 5568.1000 — updated on September 4, 2026

Microsoft 365/Office 5568.1000

Supported on: At least Windows Server 2016, Windows 10

Path in the GPO console

User Configuration\Administrative Templates\Microsoft Office 2016\Security Settings

Description

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.

Registry

HKCU software\policies\microsoft\vba\security

Value name: allowvbaintranetreferences

Enabled: allowvbaintranetreferences = 1

Disabled: allowvbaintranetreferences = 0

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Allow VBA to load typelib references by path from untrusted intranet locations
; State: Enabled
; Supported on: At least Windows Server 2016, Windows 10

[HKEY_CURRENT_USER\software\policies\microsoft\vba\security]
"allowvbaintranetreferences"=dword:00000001
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Allow VBA to load typelib references by path from untrusted intranet locations
# State: Enabled
# Supported on: At least Windows Server 2016, Windows 10
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.

$path = 'HKCU:\software\policies\microsoft\vba\security'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'allowvbaintranetreferences' -Value 1 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview