Wednesday, September 24, 2008

Mail Merge with OOo

OpenOffice 2.0 provides a comprehensive list of Mail Merge features.

What is mail merge?
This is taking a list of details (usually in column and rows format) from a spreadsheet or database and forming a document (Writer) with details from each of the database rows in a user defined format. Namely this is used for letters and labels for a large number of users.

OOo provides several methods to achieve a mail merge.

In the following examples, I take the registered database name is db. The database as a spreadsheet file named db.ods that contains the following column names in a table called friends;

Position, Salutation, Name, Address1, Address2, Postcode, Area, State

A. Data to Text Method - simplified
This provides a list of the records which is usually separated by new lines.
  1. Open a new Writer document.
  2. Press F4, Select the database db, Tables friends
  3. In the database view, select the cell that is in the upper left corner (highlights all) and in the Datasources toolbar, select the button Data to Text.
  4. In the pop-up, Insert data as: Text
  5. Select the fields from the Database Column into the right empty box. Here, you can arrange the position of the fields and add extra text. Click OK when done.
  6. A document with all the data is prepared, save and exit.
B. Multiple records per page
Create a single file containing continuous rows of records.
  1. Open a new Writer document.
  2. Press F4, Select the database db, Tables friends
  3. In the database view, select the column headers that you want into the text document. Rearrange and format as needed. In the last row, select the Insert ->Field ->Other. A pop-up box appears, select Database ->Next Record, set value to TRUE. Click Insert then Close. This should provide the basic set of information to display a single record.
  4. Highlight the rows for the newly create record. Copy and paste as many as required per page.
  5. Click File ->Print.
  6. On the pop-up "Do you want to print a form letter" click Yes.
  7. Select File, Save as Single Document. Click OK.
  8. Enter a filename and click Save.
  9. Open the newly created file to verify the records are correct.
  10. Save the file with the formatted rows as a template for future use.

No comments:

Blog Archive