This is an old revision of the document!


OpenOffice Mail Merge

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.

  1. create a new spreadsheet file
  2. label the top row of each column for the data you will input below (i.e.: last name, first name, address 1, etc…)
  3. input each person as desired in the rows below
  4. (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
  5. save the file and note the name and location for the next step

* You may also use Tools → Mail Merge Wizard to automatically create the database

  1. create a new database file
  2. in the database wizard, select “Connect to an existing database”, “Spreadsheet”, and click Next
  3. browse for the spreadsheet file you just created, and click Open, then Next
  4. select 'Yes, register the database for me“
  5. uncheck “Open the database for editing”
  6. click Finish, and save the database file (doesn't matter where, but probably put it in the same folder as the spreadsheet)
  • if you selected “Yes, register the database for me” from the previous section, then the database should already be recognized by OpenOffice
  1. open the Options dialog: Tools → Options (Preferences on the Mac)
  2. OpenOffice Base → Databases
  3. New
  4. Browse… for database file (.odb)
  5. Click Open, OK, OK

* 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.

  1. create a new Text Document
  2. Insert → Envelope…
  3. Click the Printer tab
    1. select the appropriate feed direction for your printer
  4. Click the Format tab
    1. select the proper envelope under Size → Format, or enter a custom size
    2. position the Addressee / Sender accordingly
  5. Click the Envelope tab
    1. select your database from the Database drop down menu
    2. select your sheet name (probably Sheet1)
    3. select a desired Database Field
    4. click the arrow to add the field to your Addressee block
    5. type enter after the field you just added, or do whatever you like to format it accordingly
    6. add other fields as desired, while typing commas or other things when necessary
    7. type your address in the sender box
  6. Click New Doc. to create a new document with the proper information
  7. save the envelope template document (suggestion: same folder as spreadsheet, Example: “Envelope - No 10.odt”)
  1. create a letter as desired, until you get to the point where you want recipient data to appear (addresses, salutations,e etc…)
  2. View → Data Sources
  3. expand your database until you get to <database name> → Tables → Sheet1 (or whatever your sheet is called)
  4. when you click your sheet, you should see a listing of your columns
  5. click and drag from the column heading of your choice into your main document, where you want this data to appear
  6. press return or format accordingly
  7. drag another column heading into your document, as desired
  8. when you are finished dragging columns, close the Data Sources dialog (View → Data Sources, or use the toolbar button)
  9. save your letter template document (suggestion: same folder as spreadsheet, Example: “Letter - Easter.odt”
  1. with your envelope or letter template open, File → Print
  2. on the dialog asking if you want to print a form letter, click “Yes”
  3. (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
  4. click Print
  5. follow your normal print dialogs accordingly
  • docs/openoffice/mail_merge.1175015448.txt.gz
  • Last modified: 2008/08/03 00:25
  • (external edit)