Before beginning this process, note the brand and type of labels you intend to use.
To print mailing labels:
- Click File > New > Labels.
- On the Options tab, ensure that the Synchronise contents checkbox is selected.
- On the Labels tab, select the Database and Table. Select the Brand of labels to be used, and then select the Type of label.
|| If the type of label you wish to use is not on the list, you need to use the Format tab to define a new Brand and Type. This is beyond the scope of this document, but is relatively simple to implement, given knowledge of the dimensions of the label.
Select Database, Table, label Brand, and label Type.
- Click the dropdown arrow under Database field. Select the first field to be used in the label (in this example, Title). Click the left arrow button to move this field to the Label text area.
Move fields from Database field list to Label text area.
- Continue adding fields and inserting desired punctuation, spaces, and line breaks until the label is composed. The figure below shows the completed label.
The completed label.
- Click New Document. You now have a new, single‑page document containing a series of frames, one for each label of the selected type and filled with the data source address fields that you selected. Quite often some of the fields in your address data source will be unused, leading to blank lines in your labels. If this is not important, you can skip the next few paragraphs and go straight to Step 7, otherwise continue as described here.
- First ensure that the label frames are showing the field contents (data source headings), rather than their underlying field names. If this is not the case, then either press Ctrl+F9 or select View>Field Names to toggle the view.
- Next, ensure that you can see non‑printing characters, such as paragraph marks, line breaks and so on. If these are not already visible, select View > Nonprinting Characters from the menu bar, or press Ctrl+F10, or click on the paragraph icon
in the Standard toolbar.
You will now see that address field separation is created by line breaks
, rather than paragraphs
. As the suppression of blank address fields depends on hiding paragraphs, not lines, you need to replace line breaks with paragraphs as follows.
- Click in the first label, at the end of the last data source address field in the first line of the label. Press Delete to remove the new line character and then press Return (or the Enter key) to insert a paragraph marker. Repeat this action for each line in the address.
If the line spacing in the first label is not satisfactory, you may wish to correct this before proceeding, by modifying the paragraph style associated with the address. Unless you have changed it, the address uses the Default style.
|| The objective of step c) is to replace all line breaks at the end of data source address fields with paragraphs. Sometimes the address data field may be longer than the width of the label and will wrap to the next physical line: make sure that you are not misled by this into deleting and replacing anything other than line break characters.
- Click again at the end of the first paragraph to be conditionally suppressed and then select Insert > Fields > Other. Select the Functions tab and then click on Hidden Paragraph in the Type column. Now click in the Condition box and enter the details of the condition that defines a blank address field. It has the general form of: ![Database.Table.Database field] where the ‘!’ (NOT) character indicates the negative case and the square brackets indicate the condition.
For example, in our Points database the condition to test if the Company field is empty would be ![Points.Sheet1.Company] as illustrated in Figure 12.
To test for multiple conditions, use the operators AND and/or OR between the conditional statements, for example:
Click Insert, but do not close the dialog until all lines have been amended.
- Repeat for each paragraph to be conditionally suppressed, remembering to advance the cursor to the end of the line in question before changing the last element of the condition and Inserting the result.
|| The last paragraph of the label address block ends with a special field, Next record:Database.Table (Next record:Points.Sheet1 in our example), and the Hidden paragraph field MUST be inserted before this field. This can generally be accomplished by clicking at the end of the paragraph and then using the Left Arrow key once to skip back over it.
A clue that you omitted this action is the observation that some records have been skipped and are missing from the final output.
- Remembering that we selected Synchronise contents earlier, you should now be able to see a small window containing a button labelled Synchronise Labels. Click on this button and the hidden paragraph fields are propagated to all the labels in your document.
You now have a template suitable for future use with the same data source and type of label. If you wish to save it, use either File > Templates > Save as, or save it as an Open Document Text Template (.ott) into the private template directory (folder) that you have previously defined in Tools > Options > OpenOffice.org > Paths > Templates.
- Click File > Print. In the message box that appears, click Yes.
- In the Mail Merge dialog, you can choose to print all records or selected records. To select records to be printed, use Ctrl+click to select individual records. To select a block of records, select the first record in the block, scroll to the last record in the block, and Shift+click on the last record.
- Click OK to send the labels directly to the printer.
If you prefer to save the labels to a file, perhaps to allow some later editing such as changing the typeface or paragraph format, then you should select File in the output section of the Mail Merge dialog, rather than using the default Printer selection. This changes the dialog to highlight the Save merged document section, where Save as single document is pre-selected.
In this case, clicking OK brings up the Save as dialog, where a file name can be entered for the saved labels.
If you did not save the prototype label fields document (template) in step 6f, then you are prompted to do so now by another Save as dialog.
In either case, whether printing or saving to file, despite there apparently being only one page of labels, the printed or saved output will be expanded to include all of the selected records from the data source.