Word Document Templates vs. Word Add-ins (Global Templates)
Microsoft® Word add-ins and document templates both have the same file extension, the .dot extension. In fact, you can use a template as an add-in or an add-in as a template.
The best way to use a Word template is as the basis for new documents. For example, you might create an invoicing template that employees could use to create customer invoices. When users create a new document based on the template, some of the information is available to them already — the name of your company, the date, and so on. All they must do is enter the customer name and the items purchased.
An add-in, on the other hand, provides custom tools that employees can use to work with all of their Word documents, similar to the custom features provided in the UsefulTools.dot add-in. When you load an add-in, it remains loaded for each document opened in Word until you explicitly unload it.
The following table summarizes the similarities and differences between Word templates and add-ins:
|Custom document template||Add-in|
|A document template has the .dot file extension.||An add-in has the .dot file extension.|
|You can attach only one template to a document. (The Normal template always is loaded whether or not there is an attached template.)||You can load multiple add-ins at the same time.|
|A template is attached to a document at the time the document is created or after the document is created by clicking the Attach button in the Templates and Add-ins dialog box (Tools menu) and selecting the template.||An add-in is loaded by selecting the corresponding check box in the Global templates and add-ins list in the Templates and Add-ins dialog box.|
|A template can be used by any document, but it must be attached to each individual document.||When loaded, an add-in is available to all documents.|
|A template adds toolbar buttons, menu items, macros, styles, or boilerplate text to a specific document.||An add-in adds toolbar buttons, menu items, or macros to the Word environment. It does not display any boilerplate text or contain any custom styles.|
|The attached template can be accessed from VBA by using the AttachedTemplate property of a Document object. Templates are available in the Templates collection. The Templates collection contains the Normal template, the attached template (if any), and any loaded add-ins.||Add-ins in the Global templates and add-ins list, whether loaded or not, can be accessed from VBA through the Word AddIns collection. In addition, add-ins can be accessed through the Templates collection.|
|A reference to the template's VBA project is set automatically when you attach a template to a document. Therefore, you can call procedures in the template's project from the document's project.||No reference is set to an add-ins' VBA project when it is loaded. Therefore, although you can call procedures in the add-in project through toolbars, menu items, or macros, you cannot call directly a procedure in an add-ins' project from code running in a document unless you explicitly set a reference to the add-ins' project.|