Now that we have this great database of names, let's create a sheet of mailing labels. We do this with Writer, the word processor I covered in Chapter 13, but not with OpenOffice.org Base.
To begin, click File on the OpenOffice.org menu bar, and select Labels from the New submenu. You don't have to be running Writer to do this. Any OpenOffice.org application is a perfect starting point for creating labels. A few seconds after making your selection, the Labels dialog appears (see Figure 16-12).
Figure 16-12. When creating a new sheet of labels, OpenOffice.org starts by asking you about the data source.
Start by looking on the right, under the Database heading. This is where registering the database, that little step we did at the beginning, pays off. OpenOffice.org Writer already knows about the various databases and can pick my Mailing List database from the drop-down list. Below that is another drop-down list labeled Table. Click here and select the table from which you will be pulling the information you need. At the bottom of the dialog, you can select the Brand label (for example, Avery Letter Size) and the type (for example, 5961 Address).
To the left, below Label Text, is where we build the label we will be printing. At this moment, there are no fields visible there. Look again to the right to the Database Field drop-down list. Click that list and you see all the fields that make up the records in your table. Select the Database Field you want, and then click the large arrow directly to the left. The field you selected appears in the Label Text window. Put a space after the field name, then select the last name, and click the arrow again. Press <Enter> to go to the next line in the Label Text window. Next is the address, city, and so on. You may want to put a comma between the city and province (or state). Line by line, transfer the fields that you want to have appearing in your finished label (see Figure 16-13).
Figure 16-13. As you select fields, they appear in the Label Text window to the left.
Before we move on, let's quickly have a look at the other two tabs, Format and Options. The Format tab allows you to fine-tune your label dimensions. This includes margins, columns, rows, and pitch. If you selected one of the commercial labels from the list, this information will be filled in for you and you shouldn't have to worry about changing anything. Use the Options tab to select whether you are printing a full page of labels or a single label. The most interesting item here is a check box labeled Synchronize Contents. Check this box and you can edit a single label and synchronize the contents of all other labels with a click.
Go back to the Labels tab and click New Document to create your label document. Each label is pre-created with the field labels you selected in the proper place. At this stage of the game, there are no names or addresses in any of the labels, just the data fields. To populate these labels from your Mailing List database, you need to tell the new document where to get its information. To do that, click View on the menu bar and select Data Sources (you can also just press <F4>). The top part of your label document now shows the databases and tables available. Make sure you select the Addresses table from the database list. When you do, the records in that table appear in the right side of the data sources pane (see Figure 16-14).
Figure 16-14. The data source for the labels appears directly above the actual label document, in the top-right pane.
To populate your label document, you should now select which records you want included from the Table view at the top right. The easiest way to select them all is to click the button to the left of the top record, press the <Shift> key, then click the last record. You can also select individual records by holding down the <Ctrl> key and clicking the records you want. When you have made your selections, look at the secondary icon bar, directly above the data sources. There's a button fourth from the right that displays a Data to Fields tooltip if you pause your mouse over it (see Figure 16-15).
Figure 16-15. Closeup of the Data to Fields button.
Click the Data to Fields button and your document is instantly populated with all of the selected records (see Figure 16-16). You can save this document for later use or you can print the page using your chosen label stock.
Figure 16-16. With a click, all of the selected record data is transferred to the label form.