When you use the Tools –> Mail Merge Wizard in OpenOffice, it is quite limiting in that you are restricted to ending up with an address block. The way to insert other fields is not as obvious.
I have put together the tutorial below to guide you through my way of tackling a requirement of inserting fields in a document that are merged from a separate data source. These fields do not necessarily fill up an address section, but may be used in other parts of the document.
Assumed software: OpenOffice v.2.0 (minimum)
STEP 1: The Data Source
Have a spreadsheet (either MS Excel or OpenOffice Calc) with the data ready. You can use other data sources, however for the sake of this exercise, we will use a spreadsheet.
STEP 2: Set up the merge document
This is the document which you will be using as the basis for the merge. Type it out in Writer with all the spaces provided for the data that you wish to merge. In the example below, I have three spaces – next to ”Dear”, ”Username” and ”Password”.
STEP 3 – Connect the data source
Click on Insert –> Field –> Other…
Then click on the Database Tab, and then click on the ”Browse” button and select the spreadsheet you wish to use as your data source. (Click on the image below for a larger version)
[Click on the file above to enlarge screenshot]
This will add the data source to the list.
STEP 4 – Insert the fields from the data source in to your form/letter.
(1) Select ”Mail Merge Fields” (see picture above)
(2) Then in the right hand pane, click on the ”+” sign next to the spreadsheet name, and the sheet name, until you can see the heading names from your data source.
[click on the above screen shot to see this enlarged – repeat items 3, 4 & 5 from this step until you have added all the fields to your document]
(3) Click on the name of the field you want to insert into the document
(4) Click on the space in the document where you want the field to appear
(5) Click on insert
When you have inserted all the fields in the document, close the insert fields box (click on ”Close”) and you should be able to see the fields in your document, something like the following.
Now you are ready to merge.
STEP 5 – Perform the Merge
Select Tools –> Mail Merge Wizard
When the wizard window pops up, select ”Use the current document”
Then on the left side of the box, click on ”Save, print or send” (highlighted below).
You will then get a window that states ”creating documents…”
Step 6: Saving and Printing the merged document(s)
From here you will need to decide if you want one large document, or many small documents… whether you will save the merged document, the original document or just print – it”s entirely up to you. My usual tendency is to save the merged document as one document, that way I can do global replace or fiddle if I need to do anything prior to printing. Once finished I usually delete the merged document.