Share via


Microsoft Word Command Bars

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

When you create a command bar in Microsoft® Word, you have the option of storing that command bar in the Normal.dot template, in a separate template, or in the currently active document. If the command bar is stored with the Normal.dot template, it will be available to any document, even if the document is based on a different template. If the command bar is stored with the currently active document and that document is a template, the command bar will be available for any document created based on that template. If the command bar is stored with a document, it will be available only when that document is open.

In Word, custom command bars are stored in the Normal.dot file by default. If user profiles have been set up for multiple users, this file is stored in the C:\Windows\Profiles\UserName\Application Data\Microsoft\Templates subfolder. If user profiles have not been set up, the Normal.dot file is stored in the C:\Windows\Application Data\Microsoft\Templates subfolder. Command bars created in other documents or in document templates are stored with that document or template.

When you create custom applications based on Word, it is typical to store your code in a custom document template so that the code is available to documents created based on your template. You should also store any custom command bars in the template on which your custom application documents are based. If you must have your command bars available to documents based on more than one template, you can store them in a global template or add-in.

Note   It is not a good practice to store your code or command bars in a user's Normal.dot file. Many users or system administrators protect the Normal.dot file from modifications to prevent the file from being infected by a virus or to keep the file from growing to an unreasonable size. Because you can never be sure that Normal.dot will be available for modifications, you should use your own custom template or add-in to distribute your code.

When you create custom command bars in Word by using the Customize dialog box, you specify where the command bar is stored by using the Save In box on the Commands tab of the Customize dialog box. When you create a custom command bar in Word by using Microsoft® Visual Basic® for Applications (VBA) code, you specify where it is stored by using the CustomizationContext property of the Application object.

See Also

Working with Command Bars | Understanding Application-Specific Command Bar Information | Microsoft Access Command Bars | Microsoft Excel Command Bars | Microsoft FrontPage Command Bars | Microsoft Outlook Command Bars | Microsoft PowerPoint Command Bars