Merge data and save time

Whether you send letters and promotional pieces to clients or make name tags for office functions, getting names, addresses, and other unique information into boilerplate documents can be a serious pain. Microsoft Word’s data-merging tools automate the process and let you do more-advanced tricks—for example, calculating discounts or including a special postscript only on letters to A-list clients.

Bring everything together

The key to merging data in Microsoft Word 2004 ($239) is the Data Merge Manager palette (Tools: Data Merge Manager). You’ll find the tools you need here.

Create the Document The main document, which might be a letter, a flyer, or a label (for name tags), includes any stock text or images. Drag and drop special field codes onto the page to indicate where the custom data should appear (see “The Urge to Merge”).

Choose Your Merge Type Choose from three merge-type options. Use a Form Letters merge to create letters, flyers, and memos that you’ll print and mail or send by e-mail. Use a Labels merge when you want to print multiple items on a single sheet of paper—address labels or name tags, for example. Use a Catalog merge to set up complex documents that have multiple items on a page, such as catalogs and phone directories.

Locate the Data Create or identify the data source. You can use data from any number of places—an Excel list, an AppleWorks word processing document, the Microsoft Office Address Book, a FileMaker Pro database, or a delimited ASCII text file. You can also create a custom data source and store it as a Word document.

The Urge to Merge Don’t bother entering data by hand! Whether you’re creating name tags, phone lists, or form letters, Word’s Data Merge Manager can help you do it fast. Pick your merge type (A) . Drag and drop fields (B) into your document. Designate the data source, whether it’s a list of names and addresses or a complex database (C) . Preview your merged documents (D) , and print, e-mail, or save the finished product (E) .
(Click image to open full screenshot)

Merge It Use the Preview tools to check the merge. Then complete the process by printing or saving. If you use Microsoft Entourage as your default e-mail program, you can send the merged document to the recipients’ e-mail addresses. No matter what you do, you can still use the data or the main document separately later on.

Try a fast form letter

To create a simple form letter—for instance, to advertise an upcoming event—first create a new blank document in Word and choose Tools: Data Merge Manager to open the palette containing Word’s merge tools. Click on the Main Document disclosure triangle and then choose Form Letters from the Create pop-up menu. Type your letter into the Word document.

For the purposes of this example, we’re going to put the addresses in a new Word document, instead of getting data from another source. Click on the Data Source disclosure triangle and choose New Data Source from the Get Data pop-up menu. The Create Data Source window will appear. You’ll see a long list of field types under the heading Field Names In Header Row. Select any you don’t need, and click on Remove Field Name. If you want to include data that’s not in the list, type the name in the text field (for instance,

) and click on Add Field Name. When you’re done, click on OK. Give the data file a name and click on Save.

The Data Form window appears. Enter the name and address of the first person on your list. Click on Add New to add the second, and continue to add a few names. Click on OK to finish.

The fields you set up appear on the palette under the Merge Field header. Drag these fields into position on the letter. To assemble an address block, drag the Title and LastName fields onto one line and separate them with a space. On the next line, use Address1; on the following line, City, State, and PostalCode, each separated by a space. You can use the fields multiple times in a letter—for example, the salutation might read Dear «Title» «LastName».

To check your letter, click on the Preview disclosure triangle. Click on the first icon, View Merged Data, to preview your letter with information from the first record in your data document. Use the Next Record and Previous Record arrows to check the other records. To see the letter with field codes again, click on the last icon, View Field Codes.

To complete the merge, click on the Merge disclosure triangle and then on one of the icons that is revealed. Note that the third icon, Merge To E-mail, sends the document pages to Entourage as e-mail messages. (But to do this, you must include the recipients’ e-mail addresses in the data file. You must also select the field containing this data and type a subject line before e-mailing.)

Tackle tougher tasks

Try these advanced options for more-complex jobs.

Customize On-the-Fly What if your merge letter will be used repeatedly but will include some updated information, such as a class’s date and time or the details of a special offer? In a case like that, use an Ask field, which lets you add data at merge time. Say you want to include the name of the product that’s on special this month. In the palette, click on the Word Field disclosure triangle and drag an Ask field to the top of your document. (This ensures that Word will ask for this data as the merge begins.) The Insert Word Field: Ask dialog box opens.

In the Bookmark text field, type a name—for example,

(you’ll use this in a minute). Then in the Prompt field, type your request:
Please type the name of this month’s special.
Next, in the Default Bookmark Text field, type the default text that Word will use if you or another user—perhaps a salesperson—doesn’t provide any new information. Select the Ask Once option and click on OK. Click on OK again when the prompt dialog box appears with your question and default text.

Now it’s time to tell Word where to put this information when it’s received. Click where the data should appear in the document, and choose Insert: Field. In the Field dialog box, delete the current contents of the text field and type

	bookmark name
. In other words, if your bookmark’s name is Offer, you should type
REF Offer
. Click on OK. When you merge your document, Word will ask you to provide the data, you’ll type it in the dialog box and click on OK, and it will appear in each merged letter at this spot.

Do the Math Word’s merge tools can perform math, which is particularly handy if you’re creating anything involving numbers. For example, if you want to create a letter offering customers a discount on outstanding accounts paid in full this month, you could include a special field that displays an amount equal to 10 percent of the outstanding amount, which is shown elsewhere in the letter. Let’s assume that the outstanding amount is stored in a field called Outstanding. Click where the result of the calculation should appear. Press Command-F9 to insert a set of field codes. Type

= Outstanding * 0.1
inside the curly brackets and then click outside them. Word makes the 10 percent calculation individually for each record.

Add Some Logic One of the most useful tricks Word has up its sleeve is If…Then…Else fields. Use these logical calculations to make choices when you’re creating merged documents. For instance, you can set up one of these fields to check whether the letter’s recipient lives in California and, if so, insert a mention of the state tax rates in the letter. If the recipient lives somewhere else, say nothing or add a different comment.

To do this, go to the Data Merge Manager palette and click on the Word Field disclosure triangle. Drag the If…Then…Else field into place on your letter. The Insert Word Field: IF dialog box appears. Set up your conditions using its pop-up menus. For our example, you’d select State from the Field Name pop-up menu; choose Equal To from the Comparison pop-up menu; and type

into the Compare To text field. In the Insert This Text field, type the text that you want Word to insert if the condition is met. If you want something else to appear in your document if the condition isn’t met, type it in the Otherwise Insert This Text field.

Data merging has always been a useful and powerful tool for office productivity. The next time you’re performing a repetitive task, ask yourself whether a data merge might save you time and effort.

[ Helen Bradley writes for small-business and computer publications. ]

Play with your gigabytes

Six-foot block towers may be a thing of your past, but you can take storage to new heights with LaCie’s new stackable Brick Hard Drives. These red, white, or blue Lego look-alikes, which should be shipping by the time you read this, come in Mobile and Desktop versions and in capacities ranging from 40 to 500GB ($100 to $400). Brick Desktop Hard Drives are USB 2.0 only. The Brick Mobile Hard Drives are available with USB 2.0 and FireWire interfaces. —Scholle Sawyer McFarland

Shop ▾
arrow up Amazon Shop buttons are programmatically attached to all reviews, regardless of products' final review scores. Our parent company, IDG, receives advertisement revenue for shopping activity generated by the links. Because the buttons are attached programmatically, they should not be interpreted as editorial endorsements.

Subscribe to the Best of Macworld Newsletter