Disable predefined commands: registry value filesendtomailrecipient and 4 more (visio\disabledcmdbaritemscheckboxes)UserHKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes

Policy ID
L_Disablecommandbarbuttonsandmenuitems
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 Visio 2016 › Disable Items in User Interface › Predefined

Registry

filesendtomailrecipient

REG_SZUser
Checked
2188
Unchecked
0
Element
File Tab | Share | Email
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes]

; Options (use only one)
; Checked
"filesendtomailrecipient"="2188"
; Unchecked
"filesendtomailrecipient"="0"
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "filesendtomailrecipient" /t REG_SZ /d 2188 /f
:: Unchecked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "filesendtomailrecipient" /t REG_SZ /d 0 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'filesendtomailrecipient' -PropertyType String -Value '2188' -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'filesendtomailrecipient' -PropertyType String -Value '0' -Force | Out-Null

inserthyperlink

REG_SZUser
Checked
1576
Unchecked
0
Element
Insert tab | Hyperlink
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes]

; Options (use only one)
; Checked
"inserthyperlink"="1576"
; Unchecked
"inserthyperlink"="0"
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "inserthyperlink" /t REG_SZ /d 1576 /f
:: Unchecked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "inserthyperlink" /t REG_SZ /d 0 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'inserthyperlink' -PropertyType String -Value '1576' -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'inserthyperlink' -PropertyType String -Value '0' -Force | Out-Null

toolsmacrosmacros

REG_SZUser
Checked
186
Unchecked
0
Element
Developer tab | Macros
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes]

; Options (use only one)
; Checked
"toolsmacrosmacros"="186"
; Unchecked
"toolsmacrosmacros"="0"
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "toolsmacrosmacros" /t REG_SZ /d 186 /f
:: Unchecked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "toolsmacrosmacros" /t REG_SZ /d 0 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'toolsmacrosmacros' -PropertyType String -Value '186' -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'toolsmacrosmacros' -PropertyType String -Value '0' -Force | Out-Null

toolsmacrosvbe

REG_SZUser
Checked
1695
Unchecked
0
Element
Developer tab | Visual Basic
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes]

; Options (use only one)
; Checked
"toolsmacrosvbe"="1695"
; Unchecked
"toolsmacrosvbe"="0"
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "toolsmacrosvbe" /t REG_SZ /d 1695 /f
:: Unchecked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "toolsmacrosvbe" /t REG_SZ /d 0 /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'toolsmacrosvbe' -PropertyType String -Value '1695' -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'toolsmacrosvbe' -PropertyType String -Value '0' -Force | Out-Null

toolsoptions

REG_SZUser
Checked
11323
software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes\weboptions = 4107
software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes\generaloptions = 4108
Unchecked
0
software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes\weboptions = (delete value)
software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes\generaloptions = (delete value)
Element
File tab | Options
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes]

; Options (use only one)
; Checked
"toolsoptions"="11323"
"weboptions"="4107"
"generaloptions"="4108"
; Unchecked
"toolsoptions"="0"
"weboptions"=-
"generaloptions"=-
CMD
:: Options (use only one)

:: Checked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "toolsoptions" /t REG_SZ /d 11323 /f
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "weboptions" /t REG_SZ /d 4107 /f
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "generaloptions" /t REG_SZ /d 4108 /f
:: Unchecked
reg add "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "toolsoptions" /t REG_SZ /d 0 /f
reg delete "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "weboptions" /f
reg delete "HKCU\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes" /v "generaloptions" /f
PowerShell
# Common: create the key
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Force | Out-Null

# Options (use only one)
# Checked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'toolsoptions' -PropertyType String -Value '11323' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'weboptions' -PropertyType String -Value '4107' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'generaloptions' -PropertyType String -Value '4108' -Force | Out-Null
# Unchecked
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'toolsoptions' -PropertyType String -Value '0' -Force | Out-Null
Remove-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'weboptions'
Remove-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\disabledcmdbaritemscheckboxes' -Name 'generaloptions'