VBA Macro Notification Settings: registry value vbawarnings (ms project\security)UserHKCU\software\policies\microsoft\office\16.0\ms project\security
- Policy ID
- L_VBAWarningsPolicy
- Scope
- User Configuration
- Supported on
- At least Windows Server 2008 R2 or Windows 7
- Source
- Microsoft 365 Apps / Office Administrative Templates (version 5568.1000)
- Category
- Microsoft Project 2016 › Project Options › Security › Trust Center
Registry
vbawarnings
REG_DWORDUser- Enabled value
- Depends on the option value
- Element
- -
| Item | Stored value |
|---|---|
| Disable all with notification | 2 |
| Disable all except digitally signed macros | 3 |
| Disable all without notification | 4 |
| Enable all macros (not recommended) | 1 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\ms project\security] ; Options (use only one) ; Disable all with notification "vbawarnings"=dword:00000002 ; Disable all except digitally signed macros "vbawarnings"=dword:00000003 ; Disable all without notification "vbawarnings"=dword:00000004 ; Enable all macros (not recommended) "vbawarnings"=dword:00000001
CMD
:: Options (use only one) :: Disable all with notification reg add "HKCU\software\policies\microsoft\office\16.0\ms project\security" /v "vbawarnings" /t REG_DWORD /d 2 /f :: Disable all except digitally signed macros reg add "HKCU\software\policies\microsoft\office\16.0\ms project\security" /v "vbawarnings" /t REG_DWORD /d 3 /f :: Disable all without notification reg add "HKCU\software\policies\microsoft\office\16.0\ms project\security" /v "vbawarnings" /t REG_DWORD /d 4 /f :: Enable all macros (not recommended) reg add "HKCU\software\policies\microsoft\office\16.0\ms project\security" /v "vbawarnings" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\ms project\security' -Force | Out-Null # Options (use only one) # Disable all with notification New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\ms project\security' -Name 'vbawarnings' -PropertyType DWord -Value 2 -Force | Out-Null # Disable all except digitally signed macros New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\ms project\security' -Name 'vbawarnings' -PropertyType DWord -Value 3 -Force | Out-Null # Disable all without notification New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\ms project\security' -Name 'vbawarnings' -PropertyType DWord -Value 4 -Force | Out-Null # Enable all macros (not recommended) New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\ms project\security' -Name 'vbawarnings' -PropertyType DWord -Value 1 -Force | Out-Null