Application.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.

Syntax

expression .CustomizationContext

expression A variable that represents an Application object.

Remarks

Corresponds to the value of the Save in box on the Commands tab in the Customize dialog box (Tools menu).

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

See Also

Concepts

Application Object

Application Object Members