Table of Contents
[[http://blog.worldlabel.com/2012/mail-merge-address-labels-in-the-excellent-free-libreoffice.html|MAIL MERGE ADDRESS LABELS IN THE EXCELLENT FREE LIBREOFFICE]]
FEBRUARY 10, 2012
We learned how to create fancy return address labels with LibreOffice in our last installment. Today we’re going to tackle mail merge. Mail merge is a powerful, time-saving word processor feature for addressing mass-mailings and form letters. It’s easy but a little weird in LibreOffice, so follow along and learn how to be a mail merge guru.
Address Labels and Form Letters.
If you’re not familiar with LibreOffice, it is a superior offshoot of the popular free office suite OpenOffice. LibreOffice is cross-platform and runs on Linux, Mac, and Windows, and provides a word processor, database, spreadsheet, drawing program, and slideshow creator. With LibreOffice you can create address labels and form letters. It all starts with your database of addresses, and then following the not-very-intuitive steps to merge your addresses into your document. This is not well-documented in the LibreOffice help documents, and if you try to figure it out yourself you’ll get lost. So follow along and learn the right way– it’s an easy few steps when you know how. If you don’t have an address database, you don’t have to be a guru to create one because we’ll show how to do that too.
Using an Existing Address Database
Your #1 most important task is having a good clean database of addresses. Computers are not magic; garbage in, garbage out, and if your database has errors so will your mail merge. If you don’t have an existing address database then you’ll have to create one, which we will do in the next section. For this article I will assume you either have a local copy of the address book you want to use, or know how to connect to a database server.
LibreOffice can import data from any number of databases, so if you already have address databases you’re ready to rock. Follow these steps to create a sheet of address labels from an existing address database, which for this article I will creatively call “addresses”.
First open LibreOffice Writer, and then register the database you want to use, which is creating a connection to it. Open File > New > Database. Check Connect to an Existing Database, and click on the type of database you want to use. In figure 1 I’m selecting “spreadsheet” so I can use an address list I keep in a spreadsheet.
Figure 1: Registering a new database with LibreOffice. First select an existing database.
You must select whatever type of database you want to use. Then click Next and click the Browse button. This opens a filepicker; find the database file you want to use, and then click Next. It asks “Do you want the wizard to register the database in LibreOffice?” Click Yes. Make sure that Open the Database for Editing is not checked, because it will try to open it in LibreOffice Base, and that will make a mess (figure 2).
Figure 2: Completing the database registration.
Click Finish and give your new connection a name. This only names the connection, and it won’t change your original file.
Next, click File > New > Labels. Select the type of label you’re going to use, which in this example is Avery Letter Size, 5160, Sheet. Make sure that the Address box is not checked. Then go to the Database field and select your database, which should be in the list after you registered it. Select the correct table in the Table field. If you’re using a spreadsheet, the Table is the sheet of your workbook that has your addresses.
Use the Database field to select the fields you want to appear on your address labels. This is a little weird to use– be sure to do these in order, because the only way to re-order them is to delete and start over. For example, select Firstname and click the arrow. Enter a space and then put Lastname in the address box the same way. Press the return key to start a new line and keep going. I like commas on the city, state, zip line. When all your fields are selected it should look like figure 3.
Figure 3: Selecting your registered database for creating address labels, and selecting the address fields.
Next, go to the Options tab and click Entire Page and Synchronize Contents, then click New Document, and you will be rewarded with something like figure 4.
Figure 4: Your new page of labels with all of your fields.
Where are your addresses? Don’t worry, we’re almost there. Click F4, or View > Data Sources, and a pane will open displaying your database (figure 5).
Figure 5: View > Data Sources exposes your database, and you can make changes to your labels from this.
Notice also the Synchronize Contents button. This is a second chance to make any corrections. The first label on the page is the Master Label, and any changes you make to this will be propagated to all the labels. You could insert a picture, change the fields, fix spacing, anything you want. Then click the Synchronize button and all the labels will change to match the Master Label. (Read Creating Custom Fancy Address Labels in LibreOffice to learn more about this.)
The last step is inserting your actual data, and you do this by clicking Tools > Mail Merge Wizard. This is eight screens, and you should be able to breeze through them:
- On the first screen click only Use the Current Document.
- On the second screen check Letter as your document type.
- On the third and fourth screens un-check everything.
- It should skip the fifth screen, the layout screen.
- On the sixth screen you get a preview of the first label, and can preview all your other labels as well. You have one last chance to make corrections by clicking the Edit Document button. Click the Next button to create your labels
- Which takes you to screen seven, and yet another chance to edit your labels.
- The eighth and final screen has some save options, which I don’t believe are useful because all of your documents are still open, and you can save and print them like normal documents. Click Finish to complete the wizard, and there you are with your labels all ready to print, like in figure 6.
Figure 6: My test page of five labels.
Your newly-generated pages of labels are not editable, so if you need to change anything you have to go back and start over.
Creating a Simple Address Database
A database like LibreOffice Base is overkill for a simple address book, so I keep mine in a spreadsheet because it is fast and easy, and if I ever want it in a real database then I can import from the spreadsheet. You need only two elements in your address book database: a header row and your data rows. You always need a header row to supply the field names, like in figure 7.
Figure 7: A simple spreadsheet address book.