Mail Merge:The Easy Way In Open Office
We are going to look at how we can use mail merge in Open Office and take full advantage of the features contained therein. First of all we have to create our data file. Open Calc (The spreadsheet program) and type your data in it. The first row should contain your headings (Field names). For example if you want to create an address book then the first row can contain the following Title, First Name, Last Name, Address1, Address2, Address3, State, Pincode, TelNo. The rows below this will contain the respective data . More fields can be added if required in a similar manner. The screenshot below shows a simple address book data consisting of three rows .
Linking The Data Source
After you have created your address book give it a suitable name say Address Book and save it. Next we have to create the file
where we are going to use the data with. Open writer (The word processor program) and create the letter for which you are going to use the addresses from your Address Book.
After creating the letter save it with a suitable name. Next we have to link up the address book which we have created with the letter. Open the letter. Go to Tools –> Data Sources and click on New Data Source .
Give a suitable name for the data source say AddressBook. Under Database Type select Spreadsheet . Note that we can use many different types of databases in open office like MySql, dBase and any ODBC or JDBC compliant database. Under Data Source URL , browse to Address Book.sxc ( If you have named your address book that you just created as AddressBook ).
Next click on the Table and then click on OK. After this click on Query and select New Query (Design View), namely the first icon. The query design window will now be displayed along with the Add Tables dialog box. In the Add Tables dialog box click on add.
You can now drag and drop the individual fields from the table Sheet 1 in the field row at the bottom or you can keep selecting as many fields as you want in the various columns in the field row. We can also place restrictions on the data that will be generated on running the query. For example if we wish to have the address of people staying in Goa only to be merged with the letter then under the field State at the bottom, corresponding to the criterion enter Goa. The completed query is shown in the screenshot below .
Now save the query by giving it a suitable name like Qry_Address1.
Next with the letter open go to Tools –> Mail Merge and select From This Document. Next Under Data Source Connection select Use Existing. In the next window that appears select mail merge fields. Click on the + sign next to AddressBook .You will than see two entries below it Qry_Address1 and Sheet1. Click on the + sign next to Qry_Address1. You will see the list of fields.
Now position the cursor in the document where you want to insert the field select the field and click on Insert. Repeat the process for all the fields that you wish to insert. After all the fields are inserted click Close. You will now be presented with the mail merge window.
Here select Records as All, Output as File and Generate file name as Manual Setting . Give a suitable name and click OK. The addresses will be merged with your letter and sent to the printer or file as specified by you.