This is an old revision of the document!
OpenOffice Mail Merge
Summary
Create a spreadsheet with names, addresses etc…, create a database file linked to the spreadsheet, and then create envelopes or letters (the template) to specified recipients from the database. What follows is a manual method for setting up the database. You may also use the Mail Merge Wizard, but what follows offers more control and a better understanding of what is happening.
Create the Spreadsheet
- create a new spreadsheet file
- label the top row of each column for the data you will input below (i.e.: last name, first name, address 1, etc…)
- input each person as desired in the rows below
- (optional) you may wish to filter recipients based on specific criteria
- create extra columns for codes, or holidays such as Easter, Thanksgiving, and Christmas
- if you create columns with names instead of using codes, put an x or similar identifier in each corresponding column if you want that person to be included in that list
- save the file and note the name and location for the next step
Create a Database file (link) to the Spreadsheet
* You may also use Tools → Mail Merge Wizard to automatically create the database
- create a new database file
- in the database wizard, select “Connect to an existing database”, “Spreadsheet”, and click Next
- browse for the spreadsheet file you just created, and click Open, then Next
- select 'Yes, register the database for me“
- uncheck “Open the database for editing”
- click Finish, and save the database file (doesn't matter where, but probably put it in the same folder as the spreadsheet)
Add the Database to OpenOffice
Option 1 - automatically added
- if you selected “Yes, register the database for me” from the previous section, then the database should already be recognized by OpenOffice
Option 2 - add using options
- open the Options dialog: Tools → Options (Preferences on the Mac)
- OpenOffice Base → Databases
- New
- Browse… for database file (.odb)
- Click Open, OK, OK
Create the template document
* The template can be an envelope, letter, or anything else where you select individual fields from your database and orient them wherever you like, with formatting and fonts.
Envelopes
- create a new Text Document
- Insert → Envelope…
- Click the Printer tab
- select the appropriate feed direction for your printer
- Click the Format tab
- select the proper envelope under Size → Format, or enter a custom size
- position the Addressee / Sender accordingly
- Click the Envelope tab
- select your database from the Database drop down menu
- select your sheet name (probably Sheet1)
- select a desired Database Field
- click the arrow to add the field to your Addressee block
- type enter after the field you just added, or do whatever you like to format it accordingly
- add other fields as desired, while typing commas or other things when necessary
- type your address in the sender box
- Click New Doc. to create a new document with the proper information
- save the envelope template document (suggestion: same folder as spreadsheet, Example: “Envelope - No 10.odt”)
Letters
- create a letter as desired, until you get to the point where you want recipient data to appear (addresses, salutations,e etc…)
- View → Data Sources
- expand your database until you get to <database name> → Tables → Sheet1 (or whatever your sheet is called)
- when you click your sheet, you should see a listing of your columns
- click and drag from the column heading of your choice into your main document, where you want this data to appear
- press return or format accordingly
- drag another column heading into your document, as desired
- when you are finished dragging columns, close the Data Sources dialog (View → Data Sources, or use the toolbar button)
- save your letter template document (suggestion: same folder as spreadsheet, Example: “Letter - Easter.odt”
Printing
- with your envelope or letter template open, File → Print
- on the dialog asking if you want to print a form letter, click “Yes”
- (optional - filtering) when presented with columns of your data, click on a cell that has a distinguishing characteristic of your choice, such as a cell with an “x” in an Easter column, or a specific code, and click the “AutoFilter” button
- your records should be filtered based on each row having the same content that was in the cell you just filtered
- if you make a mistake, you can click the “Remove Filter/Sort” button to reset everything
- click Print
- follow your normal print dialogs accordingly