Using the Mail Merge Wizard to create a form letter
The manual method of creating a form letter described in Creating a form letter provides the most control over the result and is therefore recommended. If you prefer to use the Mail Merge wizard, the technique is described below.
Before starting you should note the following limitations, current in OOo 3:
- In Step 4 creating the salutation only allows the sex-related Mr. and Mrs. It makes no allowance for Miss or Ms, nor does it permit sexless addressing such as Dr.
- Again in Step 4, the General salutation is not editable and the default values are somewhat limited.
- In Step 5 the layout is idiosyncratic, with paragraph marks all over the place so as to space the address block frame and salutation. Creating a professional looking document requires significant editing.
If the above limitations are not a hindrance to you, then open a new document with File > New > Text Document and start the Mail Merge wizard using Tools > Mail Merge Wizard. The wizard opens, as shown below.
Step 1: Select starting document
The wizard gives various options to select your starting document:
- Use the current document.
- Create a new document.
- Use a template.
- Use an existing document.
For the purposes of this description we assume that you opened a new text document. This will ensure that all the steps in the wizard are fully explored, although with experience you may find it more practical to use a draft you prepared earlier, which will allow skipping some steps.
Select Use the current document and click Next.
Step 2: Select document type
The wizard can produce letters or, if a Java Mail connection exists, email messages. You can see these options in the figure below. In this example, we are producing a letter. Select Letter and click Next.
Step 3: Insert address block
This is the most complex step in the wizard. In this step you will do three things:
- Tell the wizard which data source to use. The data source must be an existing file; in this example it is the "Points" spreadsheet created earlier.
- Select the address block to use in the document. This means choosing which fields appear (for example, whether the country is included) and how they look.
- Make sure that the fields all match correctly. This is very important. For example, the wizard has a field called <Last Name>. If your spreadsheet has a column called "Surname", you need to tell the wizard that <Last Name> and “Surname” are the same thing. This is described in Matching the fields.
Selecting the data source (address list)
- If the current address list, identified beneath the Select Different Address List... button in section 1, is not the one you wish to use, click the button to open the Select Address List dialog for choosing a data source.
- If you have not already created the address list, you may click Create to do so now. This step allows you to create a CSV (Comma Separated Values) file with a new list of address records. If you already have an address list, as we have in the "Points" spreadsheet example, click Add and select the file in which it resides. In each of the above cases a new data source will be created and registered.
- Select the address list and click OK to return to step 3 of the wizard. For this example, the preceding steps are all you need to do. The wizard can also exclude certain records; click Filter to choose them.
Selecting the address block
- In step 3 of the wizard (shown in Step 3: Insert address block), look at section 2. This is where you select the address block to appear on the letter, and define its appearance and the fields it contains. The main page gives two examples. If neither of those is exactly what you want, click More to see more choices, in the Select Address Block dialog box (shown below).
- The Select Address Block dialog box offers six choices for the format of the addresss block (scroll down to see the last two choices). You can also optionally include or exclude the country (for example, only include the country if it is not USA). The six formats provided are relatively common, but they might not exactly match your preference. If this is the case, select the address block that is closest to what you want and click Edit, which opens the New Address Block dialog box.
- In the New Address Block dialog, you can add or delete address elements using the arrow buttons on the left. To move elements around, use the arrow buttons on the right. For example, to add an extra space between first and last names, click <Last Name> and then click the right arrow button.
Matching the fields
Finally, it is time to match the wizard’s fields with the spreadsheet fields, so that items like <Last Name> and “Surname” match correctly.
- Look at section 3 of step 3 of the wizard. The box at the bottom displays one record at a time, using the address block format you selected. Use the right and left arrow buttons below that address box to step through the addresses, checking that they display correctly. Do not assume that all the records display correctly, just because one or two do. Check them all if you can, or at least a good proportion.
- If the addresses do not display correctly (and they probably will not right away), click Match Fields. The Match Fields dialog box opens.
The Match Fields dialog box has three columns.
- Address Elements are the terms the wizard uses for each field, such as <First Name> and <Last Name>.
- Use the Matches to Field column to select, for each address element, the field from your data source that matches it.
- The Preview column shows what will be shown for this field from the selected address block, so you can double-check that the match is correct.
|You will not be able to continue until you have correctly matched all the fields in your chosen address block. If you see <not available> in a field position it indicates that the field in question is not correctly matched.|
Step 4: Create salutation
The salutation is the initial greeting, for example, Dear Mr Jones'. In step 4, select the salutation that will appear in the letter.
You can use a different greeting for men and women. To do this, Writer must have some way of knowing whether a person is male or female. In our spreadsheet we had a column called Sex. In the section Address list field indicating a female recipient, set the field name to Sex and the field value to F. The male salutation is then printed for all men and the female salutation for all women.
|You do not need to tell OOo who is a male, because it assumes that all non-female records are males.|
If you do not select Insert Personalized Salutation, you can use a more general salutation without referring to the recipient directly, such as “To whom it may concern”.
As in step 3, step 4 of the wizard has a preview pane at the bottom. You should check more than one record to ensure that other records look the way you expect.
Step 5: Adjust layout
In step 5, you can adjust the position of the address block and salutation on the page. You can place the address block anywhere on the page. The salutation is always on the left, but you can move it up and down the page. Use the buttons shown in the figure below to move the elements.
Step 6: Edit document and insert extra fields
In step 6 you have another opportunity to exclude particular recipients from the mail merge, as shown below.
You can also edit the body of the document. If you started with a blank document, you can write the whole letter in this step. Click Edit Document to shrink the wizard to a small window so you can easily edit the letter.
You need to perform another important task in this step. The wizard only inserts information from the name and address fields, but you may wish to add additional data. In our example, we want to tell each person how many points they had accumulated during the year; that information is in the spreadsheet.
To do this:
- Click Edit Document in step 6 of the wizard.
- Select Insert > Fields > Other. The Fields dialog box opens, as shown below.
- Click the Database tab.
- On the left hand side, select Mail merge fields.
- Under Database selection find your data source (in this example, it is a spreadsheet). Expand it to see the fields.
- Click the field you want to insert, then click Insert to insert the field. You can insert any number of fields any number of times into your mail merge document.
- Click Close when you are done.
|The Database selection lists the data source you selected in step 3. All the information you need for the letter must be contained in that data source.|
Step 7: Personalize documents
In step 7, OOo creates all your letters, one per recipient. If you followed step 6, you need to go back into the wizard. Go to Tools > Mail Merge Wizard.
Clicking the Edit individual Document button here is similar to step 6. The difference is that you now edit a long file containing all of the letters, so you can make changes to a particular letter to one person. In step 7 of the Mail Merge wizard, click Find to open a dialog box that allows searches within the document, perhaps for an individual addressee.
As with step 6, when editing the document, the wizard shrinks to small window. Click on this window to expand the wizard to its full size.
Step 8: Save, print or send
You have now completed the mail merge process. The last step is to do something with it. In step 8, you can save the original sample letter, save the merged document, print the letters right away or, if you created email messages, send them.
You probably want to save the starting (prototype) document and the merged document. To do this, select Save starting document to reveal the Save starting document section containing the Save starting document button. This button will be active only if the document has not already been saved. Clicking on this button brings up the standard Save as dialog. Once you have named and saved the document you return to the Step 8 dialog.
The merged document can now be saved by selection of Save merged document. This will reveal the Save merged document settings section, from which you can select to save either as one large file containing all the individual, generated letters or as a separate file for each letter.
When you have saved the merged document, you can print the final letters now or later; and you can still manually check and edit the letters if necessary.
If you elect to print at this stage, the dialog shown below appears; it should be self-explanatory.
|Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).|