Modifying and Creating Document Templates

A template stores a variety of items that form the basis of a Word document. When you create a new document, some of the items, such as text and styles, are copied into the document from the template that you select. Other items, such as AutoText entries and macros, are kept in the template. The template, however, remains attached to the document so that the document can access these items.

NOTE
Every Word document is based on a template. If you create a document using the New command on the File menu, the New Office Document command on the Start menu in Windows, or the New Office Document button on the Office Shortcut Bar, you can choose the template. If you create a new document by clicking the New button on the Standard toolbar, the document will be based on the Normal template.

Note that the template that the document is based on is also called the document template or the template attached to the document. As you'll learn later in the chapter, you can change the document template after you have created the document.

Table 8-2 lists the template items that are copied into a new document. Once you have created a new document, both the document and the template have separate copies of these items. Changing one of these items in the document won't affect the template, and changing an item in the template won't affect the document.

Table 8-2. Template Items That Are Copied to a New Document

Template Item Comments
Text and graphics, together with the formatting assigned to them Includes headers, footers, footnotes, and comments
Page setup Margins, paper size and source, page layout, and other features (explained in Chapter 11."Designing Pages"); also, default tab stops (explained in "Using Tabs").
Styles Predefined and custom styles

NOTE
Word will copy style changes from documents to templates or vice versa if you select Add To Template in the Modify Style dialog box or if you select Automatically Update Document Styles in the Templates And Add-Ins dialog box. See "Modifying Styles Using the Style Dialog Box" and "Copying Styles from a Template to a Document".

Table 8-3 lists the items that are kept in the template when a new document is created. A document can access any item stored in the document template. It can also access any item stored in the Normal template. (Of course, if the document is based on Normal, the document template and Normal are the same.) And a document can access any item that is stored in a template that has been explicitly loaded as a global template. (Loading global templates is discussed in "Changing the Template Attached to a Document and Loading Global Templates.")

SEE ALSO
For information on choosing a template when you create a new document, see "Creating and Printing a Document from Start to Finish".

For example, if an AutoText entry named Close is defined in either the document template or the Normal template, you can insert it into your document using any of the methods discussed in "Using the AutoText Feature". If an AutoText entry named Close is defined in both the document template and the Normal template, Word inserts the text defined in the document template. (That is, an item defined in the document template overrides a similarly named item in the Normal template or other global templates.)

Table 8-3. Template Items Kept Within the Document Template

Template Item Comments
AutoText entries An AutoText entry is a frequently used block of text or graphics that can be inserted into a document (as explained in "Using the AutoText Feature."
Macros A macro is a script for automating a Word task (as discussed in Part 8 of this book, "Using Visual Basic to Supercharge Office").
Custom toolbar and menu configurations Modifying toolbars and creating new ones is discussed in "Customizing Toolbars". Modifying menus is discussed in "Customizing Menus."
Shortcut key definitions Defining shortcut keys to run commands, apply styles, or perform other tasks is discussed in the sidebar "Defining Shortcut Keys."

NOTE
When you create a macro, a custom toolbar or menu, or a shortcut key definition, you have the option of storing it within the document rather than within a template so that the item will be private to that document.

Modifying Templates

You can modify Word templates in a variety of ways. When you take any of the following common Word actions, you modify the template:

You can also directly change the contents of one or more templates by using the Organizer. Using the Organizer you can delete, rename, or copy (from one template to another) styles, AutoText entries, custom toolbars, or macros. To open the Organizer dialog box, either choose Style from the Format menu or choose Templates And Add-Ins from the Tools menu, and then click the Organizer button (in the Style or Templates And Add-Ins dialog box). In the Organizer dialog box, first click the tab corresponding to the type of template item that you want to manage, and then follow the guidelines given in Figure 8-7.

NOTE
You can delete, copy, or rename styles, custom toolbars, or macros stored in either a document or a template. AutoText entries, however, are stored only in templates.

TIP
To select a range of items in the Organizer list, press Shift and click the first and then the last item. To select several items that are not adjoining, press Ctrl and click each item.

click to view at full size.

Figure 8-7. Using the Organizer to copy, delete, or rename template items.

NOTE
You might wonder why the Organizer doesn't show all the built-in styles that are available in a template or document. The reason is that a built-in style isn't actually stored in a template or document until it has been modified or applied to text. (Until that time, it's kept only in Word.) The Organizer lists only styles that are actually stored in a template or document. (In contrast, the Style dialog box lists all available styles, provided that the All Styles option is selected.)

A final way to modify a template is to open the template file and edit it in the same way you edit a document. The following are the general steps:

  1. Choose Open from the File menu, or click the Open button on the Standard toolbar.
  2. In the Open dialog box, select Document Templates (*.dot) in the Files Of Type list box, and then select the template file you want to modify. The templates supplied with Word are stored in C:\Windows\Application Data\Microsoft\Templates.
  3. Edit and format the template using the same techniques used for documents. You can add or modify any of the template items listed in Table 8-2 and Table 8-3. For the items listed in Table 8-3, be sure to save your changes in the template itself rather than in the Normal template.
  4. Choose Save from the File menu, or click the Save button to save your changes.

Creating New Templates

The procedure for creating a new template is similar to that for creating a new document. The following are the basic steps:

  1. Choose New from the File menu.
  2. In the New dialog box, select the Template option in the lower right corner, select an existing template to use as the starting point for your new template, and click OK.
  3. Enter text and graphics, edit, and format the new template using the same techniques used for documents. You can add any of the items listed in Table 8-2, and Table 8-3. For the items listed in Table 8-3, be sure to save your changes in the template itself rather than in the Normal template.
  4. Choose Save from the File menu, or click the Save button to save the new template.

The first time you save the template, Word will open the Save As dialog box and will automatically switch to your current Templates folder. If you want the New command to display the template you have created, you must save it in the file folder designated as your Templates folder. If you haven't set up custom user profiles (using the Passwords item in the Windows Control Panel), the default Templates folder is C:\Windows\Application Data\Microsoft\Templates. (For C:\Windows substitute the Windows folder on your computer if it's different.) If you have set up custom user profiles, the default User Templates folder will be within your personal profiles folder.

You can save the template directly within your User Templates folder; in this case, the template will be displayed on the General tab of the New dialog box. Alternatively, you can place it within a subfolder of your User Templates folder (an existing subfolder or a new one that you create); in this case, the template will be displayed in the New dialog box on a tab that's labeled with the name of the subfolder.

TIP
Choose the Location for Your Templates

You can designate a different folder as your User Templates folder, causing the New dialog box to display the templates stored in the new folder you specify, rather than in the original User Templates folder. To do this, choose Options from the Tools menu, click the File Locations tab, click User Templates in the list, click the Modify button, and enter the new folder path. This change will affect all Office applications that use templates, not just Word.

Notice that on the File Locations tab, you can also designate a Workgroup Templates folder. (Initially, no folder is assigned to this item.) If you do so, the New dialog box will display the templates in the Workgroup Templates folder in addition to those in the User Templates folder. Typically, the Workgroup Templates folder is located on a network and contains a set of templates that you share with co-workers.

Note that in addition to the new and customized templates stored in the User Templates and Workgroup Templates folders, the New dialog box displays the templates that are supplied with Word, such as Contemporary Letter and Professional Memo.

Also, you must name the template file with the.dot extension or omit the extension. (If you omit it, Word will add the.dot.) Note that extensions might not be displayed when you list files, depending on the options you have chosen in Windows.

TIP
Base a New Template on an Existing Document

You can get a head start on creating a new template by basing it on an existing document. To do this, open the document and immediately choose Save As from the File menu, select Document Template (*.dot) in the Save As Type list box, specify a name and location for the new template, and click OK. Then make any changes you want and use the Save command to save these changes.

Changing the Template Attached to a Document and Loading Global Templates

You can change the template that is attached to a document. When you do this, all the AutoText entries, macros, custom toolbars and menus, and shortcut keys that are stored in the new template become available to the document (in place of the items stored in the previous template). To change the document template, do the following:

  1. Open the document you want to change.
  2. Choose Templates And Add-Ins from the Tools menu. Word will display the Templates And Add-Ins dialog box. (See Figure 8-6).
  3. Click the Attach button.
  4. Select the desired template in the Attach Template dialog box. Make sure that Document Templates (*.dot) is selected in the Files Of Type list box. Then click the Open button.

Also, Word allows you to load one or more templates in addition to the document template. An additional template that you have loaded is known as a global template, and all the AutoText entries, macros, custom toolbars and menus, and shortcut keys that are stored in these templates also become available to any document open in Word. (An item defined in a document template overrides a similarly named item in any of the global templates you load.) To load a global template, choose Templates And Add-Ins from the Tools menu, and do the following:

NOTE
You can also load a Word add-in, which is a utility program that supplies enhancement features to Word. (You typically obtain such a program from a software vendor.) To do this, use the procedure for opening an additional template, except that in the Add Template dialog box you should choose the Word Add-Ins (*.wll) item in the Files Of Type list box.

A global template or add-in will remain loaded only for the remainder of your current Word session. When you exit and restart Word, you'll need to reload it by checking it in the Global Templates And Add-Ins list. (The template or add-in will still be in the list, although it won't be checked.)



Running Microsoft Office 2000 Small Business
Running Microsoft Office 2000
ISBN: 1572319585
EAN: 2147483647
Year: 2005
Pages: 228
Authors: Michael Halvorson, Michael J. Young
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net