Trust access to Visual Basic Project
| Registry value | accessvbom |
| Group Policy | Trust access to Visual Basic Project |
| German version | Zugriff auf Visual Basic-Projekt vertrauen |
| Intune settings catalog | Trust access to Visual Basic Project (User) |
| Scope | User · HKCU |
| ADMX | word16.admx · L_TrustaccesstoVisualBasicProject |
Group Policy path
Registry
| Value | Data |
|---|---|
HKCU\Software\policies\microsoft\office\16.0\word\security | |
| accessvbom | Enabled = 1 · Disabled = 0 |
Not configured = the value does not exist – the application default applies and users may change the setting.
PowerShell
Check the current value (read-only)
# --- Settings ---
$root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'
$key = "$root\Software\policies\microsoft\office\16.0\word\security"
foreach ($name in @('accessvbom')) {
try { '{0} = {1}' -f $name, (Get-ItemPropertyValue -Path $key -Name $name -ErrorAction Stop) }
catch { '{0}: not configured' -f $name }
}Admin rights needed: HKCU\Software\Policies is read-only for standard users. An elevated session writes to the admin's own HKCU – to set it for another signed-in user, change $root to Registry::HKEY_USERS\<SID>.
Enable
# --- Settings ---
$root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'
try {
$key = "$root\Software\policies\microsoft\office\16.0\word\security"
if (-not (Test-Path $key)) { New-Item -Path $key -Force -ErrorAction Stop | Out-Null }
New-ItemProperty -Path $key -Name 'accessvbom' -PropertyType DWord -Value 1 -Force -ErrorAction Stop | Out-Null # Enabled
'Done.'
}
catch { Write-Error "Failed: $($_.Exception.Message)" }Disable
# --- Settings ---
$root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>'
try {
$key = "$root\Software\policies\microsoft\office\16.0\word\security"
if (-not (Test-Path $key)) { New-Item -Path $key -Force -ErrorAction Stop | Out-Null }
New-ItemProperty -Path $key -Name 'accessvbom' -PropertyType DWord -Value 0 -Force -ErrorAction Stop | Out-Null # Disabled
'Done.'
}
catch { Write-Error "Failed: $($_.Exception.Message)" }Reset to Not configured
# --- Settings --- $root = 'HKCU:' # other signed-in user (elevated): 'Registry::HKEY_USERS\<SID>' $key = "$root\Software\policies\microsoft\office\16.0\word\security" Remove-ItemProperty -Path $key -Name 'accessvbom' -ErrorAction SilentlyContinue 'Policy values removed (Not configured).'
Intune (settings catalog)
Trust access to Visual Basic Project (User)
Settings catalog → Add settings → search for the name above.
Intune Settings Catalog Viewer ↗
Alternative: custom profile (OMA-URI)
| OMA-URI | ./User/Vendor/MSFT/Policy/Config/word16v2~Policy~L_MicrosoftOfficeWord~L_WordOptions~L_Security~L_TrustCenter/L_TrustaccesstoVisualBasicProject |
| Data type | String |
| Value | <enabled/> · <disabled/> |
Cloud Policy
Cloud Policy (config.office.com → Customization → Policy Management) offers many user policies of the Microsoft 365 Apps – search for Trust access to Visual Basic Project. It also applies to unmanaged devices and wins over GPO and Intune for the same setting.
Microsoft explanation
This policy setting controls whether automation clients such as Microsoft Visual Studio 2005 Tools for Microsoft Office (VSTO) can access the Visual Basic for Applications project system in the specified applications. VSTO projects require access to the Visual Basic for Applications project system in Excel, PowerPoint, and Word, even though the projects do not use Visual Basic for Applications. Design-time support of controls in both Visual Basic and C# projects depends on the Visual Basic for Applications project system in Word and Excel.
If you enable this policy setting, VSTO and other automation clients can access the Visual Basic for Applications project system in the specified applications. Users will not be able to change this behavior through the "Trust access to the VBA project object model" user interface option under the Macro Settings section of the Trust Center.
If you disable this policy setting, VSTO does not have programmatic access to VBA projects. In addition, the "Trust access to the VBA project object model" check box is cleared and users cannot change it. Note: Disabling this policy setting prevents VSTO projects from interacting properly with the VBA project system in the selected application.
If you do not configure this policy setting, automation clients do not have programmatic access to VBA projects. Users can enable this by selecting the "Trust access to the VBA project object model" in the "Macro Settings" section of the Trust Center. However, doing so allows macros in any documents the user opens to access the core Visual Basic objects, methods, and properties, which represents a potential security hazard.
Same category: Microsoft Word 2016 › Word Options › Security › Trust Center
- Turn off Trusted Documents on the networkdisablenetworktrusteddocuments
- Turn off trusted documentsdisabletrusteddocuments
- Set maximum number of trusted documentsmaxtrusteddocuments
- Set maximum number of trust records to preservemaxpreservetrusteddocuments
- Block macros from running in Office files from the internetblockcontentexecutionfrominternet
- VBA Macro Notification Settingsvbawarnings
- Scan encrypted macros in Word Open XML documentswordbypassencryptedmacroscan
- Disable all application add-insdisablealladdins
- Require that application add-ins are signed by Trusted Publisherrequireaddinsig
- Disable Trust Bar Notification for unsigned application add-ins and block themnotbpromptunsignedaddin
- Dynamic Data Exchangeallowdde
- Allow embedded TrueType fonts to be sent in messageswordmailloadembeddedfonts
All policies in this category · All 295 policies of word16.admx