en-US office user

VBA Macro Notification Settings

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

Microsoft 365/Office 5568.1000

Supported on: At least Windows Server 2008 R2 or Windows 7

Path in the GPO console

User Configuration\Administrative Templates\Microsoft Publisher 2016\Security\Trust Center

Description

This policy setting controls how the specified applications warn users when Visual Basic for Applications (VBA) macros are present. If you enable this policy setting, you can choose from four options for determining how the specified applications will warn the user about macros: - Disable all with notification: The application displays the Trust Bar for all macros, whether signed or unsigned. This option enforces the default configuration in Office. - Disable all except digitally signed macros: The application displays the Trust Bar for digitally signed macros, allowing users to enable them or leave them disabled. Any unsigned macros are disabled, and users are not notified. - Disable all without notification: The application disables all macros, whether signed or unsigned, and does not notify users. - Enable all macros (not recommended): All macros are enabled, whether signed or unsigned. This option can significantly reduce security by allowing dangerous code to run undetected. If you disable this policy setting, "Disable all with notification" will be the default setting. If you do not configure this policy setting, when users open files in the specified applications that contain VBA macros, the applications open the files with the macros disabled and display the Trust Bar with a warning that macros are present and have been disabled. Users can inspect and edit the files if appropriate, but cannot use any disabled functionality until they enable it by clicking "Enable Content" on the Trust Bar. If the user clicks "Enable Content", then the document is added as a trusted document. If you select “Disable all except digitally signed macros” we recommend that you also select the “Require macros to be signed by a trusted publisher” check box to help improve security. If you select the “Require macros to be signed by a trusted publisher” check box, users opening files with digitally signed macros but not by a Trusted Publisher will receive a notification that macros are blocked from running. And there are two additional check boxes that we recommend that you select to help improve security. - Block certificates from trusted publishers that are installed in the current user certificate store - Require Extended Key Usage (EKU) for certificates from trusted publishers Note: These two check boxes only apply if you have selected the "Require macros to be signed by a trusted publisher" check box. Note: All three check boxes only apply to Version 2012 and later of Office and Visio. They don’t apply to Office 2016 or Office 2019. If you select the “Block certificates from trusted publishers that are installed in the local machine certificate store” check box, macros won’t run if the certificate from the trusted publisher is installed in the current user certificate store. The certificate must be installed in the local machine certificate store for the macro to run. Only accounts with administrator access to the computer can install a certificate in the local machine certificate store. If you select the “Require Extended Key Usage (EKU) for certificates from trusted publishers” check box, the EKU must include “Code Signing” as one of the uses of the certificate. Important: If "Disable all except digitally signed macros" is selected, users will not be able to open unsigned Access databases. Also, note that Microsoft Office stores certificates for trusted publishers in the Internet Explorer trusted publisher store. Earlier versions of Microsoft Office stored trusted publisher certificate information (specifically, the certificate thumbprint) in a special Office trusted publisher store. Microsoft Office still reads trusted publisher certificate information from the Office trusted publisher store, but it does not write information to this store. Therefore, if you created a list of trusted publishers in a previous version of Microsoft Office and you upgrade to Office, your trusted publisher list will still be recognized. However, any trusted publisher certificates that you add to the list will be stored in the Internet Explorer trusted publisher store.

Registry

HKCU software\policies\microsoft\office\16.0\publisher\security

More options available

Options

vbawarnings enum
  • Disable all with notification -> 2 (default)
  • Disable all except digitally signed macros -> 3
  • Disable all without notification -> 4
  • Enable all macros (not recommended) -> 1
Require macros to be signed by a trusted publisher
vbadigsigtrustedpublishers boolean
Block certificates from trusted publishers that are only installed in the current user certificate store
vbarequirelmtrustedpublisher boolean
Require Extended Key Usage (EKU) for certificates from trusted publishers
vbarequiredigsigwithcodesigningeku boolean

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: VBA Macro Notification Settings
; State: Enabled
; Supported on: At least Windows Server 2008 R2 or Windows 7

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\publisher\security]
"vbawarnings"=dword:00000002
"vbadigsigtrustedpublishers"=dword:00000000
"vbarequirelmtrustedpublisher"=dword:00000000
"vbarequiredigsigwithcodesigningeku"=dword:00000000
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: VBA Macro Notification Settings
# State: Enabled
# Supported on: At least Windows Server 2008 R2 or Windows 7
# 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\office\16.0\publisher\security'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'vbawarnings' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'vbadigsigtrustedpublishers' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'vbarequirelmtrustedpublisher' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'vbarequiredigsigwithcodesigningeku' -Value 0 -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