

For instance, if you only wanted to change the margins to match your template, all you need to keep in this macro are the four lines that set the margins. You can delete any portions of the macro that you don't feel are applicable. When completed, the new document created by the macro is deleted. This macro determines the template in use, creates a new document based on that template, and then copies the page setup information from the new document to the original one. MirrorMargins = ĪctiveDocument.Close SaveChanges:=wdDoNotSaveChanges The following macro can serve as your guide:Ī With this understanding, if you still want to apply the page setup information from a template to the current document, you can do it rather easily using a macro.

In this case, the new document is simply a reflection of the entire template document. There is no such problem, however, when you are first creating a document based on a template. When you attach a new template to a document, how is Word supposed to know which section's page setup should be overwritten? If it applies the page setup from the template to all the sections in the document, then you could lose quite a bit of work. This means that you can vary page setup for each section defined in your document. Why? Because page setup information, within Word, is a function of sections. This can be frustrating, until you realize that applying it could create quite a few problems. For instance, the page setup for the template is not applied to a document. When you change templates on a document, not everything from the new template is applied to the document. (See Figure 1.) You display this dialog box by choosing Templates and Add-Ins from the Tools menu.įigure 1. You change the template attached to a document by using the Templates and Add-ins dialog box.

You can change how a document looks by simply changing the template attached to the document and then applying styles, as necessary. Templates are nothing but special collections of styles, macros, toolbars, and other "goodies" that define your Word environment. Other issues of WordTips have addressed how to use templates.
