Creating a Word Add-in
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.
You should create an add-in when:
- Your solution does not require boilerplate text or custom styles.
- You want to make some functionality available to any document the user creates, through toolbar buttons, menu commands, or macros.
To create a Word add-in
- Create a Microsoft® Word document. Then, from the File menu, select Save As, and select Word Document Template in the Save as Type box.
- From the Tools menu, select Macro, and then select Visual Basic Editor.
- From the File menu, select New Project, and then select Add-In Project.
- Specify the new add-in, and add code that creates a new toolbar with buttons that call your code when they are clicked.
- From the Debug menu, select Compile ProjectName.
- If you want, you can protect the project from viewing, as described in Securing an Access, Excel, PowerPoint, or Word Add-in's VBA Project.
- Save the template as type Document Template with the .dot extension.
To change the default path for templates
In Word, from the Tools menu, select Options.
In the Options dialog box, select the File Locations tab.
From the File types list, select User templates, and then click Modify.
Note If you want the add-in to load automatically when you start Word, save the add-in to the Word Startup folder. In addition, you can modify the default location for workgroup templates in the Options dialog box. Workgroup templates are templates that you share on a network with other users.