The macros available in this template include the following.

Document_Open event that provides the dialog box you see when you open this template, if you enable the macros in the template.

In the SampleMacros module

Set all content controls in the document to be removed when its contents are edited.

Delete all content controls in the document and leave only their results.

Create a new document with a reference table of the values to use in Word VBA for applying Theme Colors to document content

Turn off link to previous for all headers and footers throughout the document

Examples of a few typical clean-up steps for poorly formatted documents

Convert all embedded or linked objects in the document to pictures (other than Excel 2007 charts, which are not contained in LINK or EMBED fields when pasted as a linked or embedded object)

Sets all open documents to Print Layout view and Page Width zoom, and then saves and closes each document.

Two macro options for creating a custom TOC without using the TOC feature. As discussed in Chapter 10, you’re better off using the built-in feature when you can. But when you need unique formatting not available through the TOC feature, you may be able to use a macro. This simple example generates a TOC from Heading 1 text with custom information for the page number. [The second of these macro options is a refinement of the first to simplify the code.]

In the AutomateUserForms module

The Memo procedure creates a new document based on a specified template, and then uses the custom UserForm named frmMemo (also saved in this template) to automate completing part of the memo.

The SelectDoc procedure automates the UserForm in this template named frmSelect, which demonstrates one way to populate a combo box control and lets the user select between document types.

Note: Be sure to read the comment text for the procedures in this module before using. They require that copies of some of the sample templates provided for Chapter 20 in the book be saved to a specified location for use with these macros.