CustomizationContext Property

Applies To

Application object, Global object.

Description

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. Corresponds to the value of the Save in box on the Commands tab in the Customize dialog box (Tools menu). Read/write.

See Also

Add method (KeyBindings collection), BuildKeyCode method, CommandBars property, Context property, Disable method, FindKey property, KeyBindings property, Rebind method.

Example

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