Quickly Formatting Multiple Documents

Written by Allen Wyatt (last updated March 28, 2022)
This tip applies to Word 97, 2000, 2002, and 2003


If you routinely receive documents from different people, you may be wondering if there is a way to format the documents so they all look the same. It can be frustrating to work with documents where everyone has a different idea of what looks "good" on a printed page.

The tried-and-true method of standardizing the formatting of information in a document is to simply use styles. If you define a set of styles that cover all your formatting needs, you can then store these in a template that can be easily applied to a multitude of documents. You then attach the template to a document by following these steps:

  1. Choose the Templates and Add-Ins option from the Tools menu. Word displays the Templates and Add-ins dialog box. (See Figure 1.)
  2. Figure 1. The Templates and Add-ins dialog box.

  3. Using the Attach button, locate and select the template you want attached to the current document.
  4. Make sure the Automatically Update Document Styles check box is selected.
  5. Click on OK.

These few simple steps apply the formatting in the template to the open document. What does this mean? It means that the appearance of anything formatted with styles in the current document will be updated to reflect styles with the same names in the template. For instance, if there is a Body Text format in both the document and the template, the style definitions in the template will override those in the document, thereby standardizing the appearance of the document.

There are a couple of big caveats to this, of course. If the document does not utilize styles, or if the character formatting in the document has been explicitly overridden (in other words, the user selected text and used the Font dialog box or toolbars to format text), then attaching the template to the document will have no appreciable effect on the text. You will still need to go through the document and manually apply the styles from the newly attached template.

The other thing that is not updated when you attach a new template is information contained in the Page Setup dialog box. Thus, things like paper size, margins, header and footer locations, and orientation are not affected. These need to be either updated manually on a document-by-document basis, or done as a whole through the use of a macro. The framework for such a macro is as follows:

Sub MassFormatFiles
    Dim JName As String

    Dialogs(wdDialogFileOpen).Show
    Application.ScreenUpdating = False
    JName = Dir("*.doc")
    While (JName > "")
        Application.Documents.Open FileName:=JName

            'Do formatting here

        ActiveDocument.Close SaveChanges:=wdSaveChanges
        JName = Dir()
    Wend
    Application.ScreenUpdating = True
End Sub

Remember that is only a framework. To use the macro, you need to replace the "Do formatting here" comment with the actual commands that do the formatting you want done to each file. You can copy these commands from a macro where you recorded the formatting steps, if desired.

When you run the macro, you will see a regular Open dialog box. All you need to do is display the folder whose files you want to process, and then click on Open. Each file is opened in turn, formatted (with your supplied formatting commands) and then saved again.

You should understand that any time you attempt to do any "mass formatting" across documents, you run the risk of messing the documents up in some unforeseen way. Why? Because there may be some relatively small but important difference in between documents that gets clumsily messed up by being overridden when applying the common formats. No amount of automatic formatting will compensate for manually looking through each page of a document to assure that everything appears as it should.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1516) applies to Microsoft Word 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Ignoring Words Containing Numbers

If your writing often contains words that include numbers, you'll want to make sure you set up the spelling checker to ...

Discover More

Printing XML Tags

Word 2003 allows you to use and save your information in XML format. If you want to, you can have Word print a document's ...

Discover More

Deleting a Range of Pages

Need to delete a range of pages out of the middle of your document? It's easy to do using editing techniques you already ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (menu)

Edits Cause Text to Switch to Odd Fonts

If you have problems with strange fonts showing up when you paste information into a document, it is helpful to ...

Discover More

Consistent Formatting Between Word Versions

When you upgrade from one version of Word to another, you may be surprised to find that your documents, all of a sudden, ...

Discover More

Breaking Lines in E-mail

If you are creating an e-mail in Word or are creating text that you will paste into an e-mail document, you may want to ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.