Global.CustomizationContext property (Word)
Returns or sets a Template or Document object that represents the template or document in which changes to menu bars, toolbars, and key bindings are stored. Read/write. .
expression. CustomizationContext
expression A variable that represents a 'Global' object.
Corresponds to the value of the Save in box on the Commands tab in the Customize dialog box (Tools menu).
This example adds the ALT+CTRL+W key combination to the FileClose command. The keyboard customization is saved in the Normal template.
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
wdKeyAlt, wdKeyW), _
KeyCategory:=wdKeyCategoryCommand, Command:="FileClose"
This example adds the File Versions button to the Standard toolbar. The command bar customization is saved in the template attached to the active document.
CustomizationContext = ActiveDocument.AttachedTemplate
Application.CommandBars("Standard").Controls.Add _
Type:=msoControlButton, _
ID:=2522, Before:=8
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.