CustomizationContext

Before customizing the menu and toolbar system, you must set the context in which the changes will be saved. This is done by setting the CustomizationContext property of the Application object to a Template or Document object.

For example, the line:

	CustomizationContext = NormalTemplate

sets the customization context to the Normal template so that all changes will be saved in this template. The line:

	CustomizationContext = ActiveDocument.AttachedTemplate

sets the customization context to the attached template of the active document.

Get Writing Word Macros, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.