Wednesday, October 1, 2008

Law Office Automation - Mail Merge in Word

Bill and I have been preaching automation for a while now. I'm going to talk about one of the very most powerful technologies known to law office automation - Mail Merge. Mail Merge is a very unfortunate name and I'm not sure Microsoft really understands the power of what they have created. Think "fill in the blanks" instead. To use Mail Merge you first create a document with blanks in it. Then you set up a database with the information that you are going to use. Finally you use Mail Merge to suck that information in.

I'm going to use an example of a summons because that's the area of law I'm working in. I've experimented with a similar setup for corporate organization/offering documents at a previous employer. You are only limited by your imagination.

First, we need to set up our document. We can leave out our "blanks." Word gives us a special "blank" to use. Below is my caption.

In this caption I left out the things that change from case to case. Here, the county, circuit, plaintiff, and defendant. Next, we can create our "database." In Excel, add headings for those items that change (remember what these headings are for later). Under the headings, we can fill in the information that will be "sucked in." Now save the Excel table (remember where you did).

The next step is to add the "blanks." First, click where you want your "blank" to go. In Word 2007 (the worst version of Word EVER) the our "blanks" are cleverly hidden under a button under the Insert tab called Quick Parts. Under that button, select Field.

The Field dialog box will open. This is where we will find our "blank," aka field. Specifically, our field is called a MergeField. Select MergeField from the Field names list. Next, under the Field properties heading, add a Field name. The field name is what connects your Word document to your Excel table. YOUR FIELD NAME HAS TO MATCH A HEADING NAME IN THE EXCEL TABLE. For example, the first field I am inserting is the Plaintiff field. In my Excel table, I named this heading "Plaintiff" (obviously). So my Field name in Word should also be Plaintiff (its not that hard right?).

After you hit ok, your Field should appear in your document. Field names will be surrounded by greater-than, less-than characters to show that there is a field there. I.e. «Plaintiff» (my Windows charactermap tells me this symbol is really a "Double angle quotation mark"). Below you can see my finished product. Now to set up the Merge.

First we have to point Word at our data source, the Excel table we made earlier. This step is where we really see that Microsoft doesn't have a clue of what kind of technology they have created. All our Merge stuff is buried under the Mailings tab in Word 2007 (I guess you can mail a summons). To pick a data source, we have to go to the Select Recipients button (what???). Then pick Use Existing List.

First navigate to where you saved your Excel file (hope you remembered). Then we select which table in the Excel file we want to use (Excel can have multiple Worksheets in a file). Our table is Sheet1 (unless you named it something).

Now our Word Template should be talking to our Excel Data Source. We can test things out. Hit the Preview Results button.

Our first record is automagically filled in.

You can cycle through the records in your Excel table with the forward and back buttons.

Finally, we can have Word spit all the records into new documents. Hit the Finish & Merge button. Then click Edit Individual Documents.

The Merge dialog will let you pick which records to Merge.

The finished product:

Now imagine how efficient this can make litigation.

EDIT: I've had an issue in Word 2003 that I want to share. Save your merge template before you associate your Excel file and don't save you template after associating the file. It seems that Word will open the Excel file in memory and, if you save your template with the Excel file associated, Word takes a snapshot of the Excel file or simply keeps it open in memory. When you try to add information to the Excel file and then do a new merge in Word, the new information isn't included. Or, wose yet, when you try to open your template that has been saved with an Excel file associated, sometimes it gives you an error indicating that the Excel file is already open. Finally, if you save your template when you are in the "Preview" mode, your MergeField will be overwritten. The moral of the story is that you (1) should get your template built how you want it, (2) save, and (3) never save when an Excel file has been associated/opened in the Word template.

1 comment:

  1. Hi, I am currently processing my divorce with my husband for 11years. He's like always trying to be really nice these past few days. I don't know how to deal with him.

    ReplyDelete