Creating a form letter

From Apache OpenOffice Wiki
Jump to: navigation, search

Example: Sending a letter to your customer base
A mail order company organized a campaign to assign credit points to their customers according to the quantity of goods they buy during one year. At the end of the year, they want to send a letter to each customer to show the total of credit points collected.

You can create a form letter manually, which is the simplest and most comprehensive method and is described here, or you can use the Mail Merge wizard to create a form letter as described in Using the Mail Merge Wizard to create a form letter. If you elect to use the wizard, pay close attention to its current (OOo V2.3) limitations, as identified within its description.

  1. Create a new text document: File > New > Text Document.
  2. Display the registered data sources: View > Data sources (or press F4).
  3. Find the data source that you wish to use for the form letter, in this case Points. Expand the Points and Tables folders, and select Sheet1. The address data file is displayed.
  4. Selecting the data source
    Selecting the data source.

  5. Now create or modify the form letter by typing in text, punctuation, line breaks, and so on that will be present in all of the letters, and adding fields where needed by clicking in the field heading and dragging to the appropriate point in the letter.
  6. Note that address lines should be in individual paragraphs, not separated by line breaks as might seem preferable. The reason for this will be made clear in the next paragraph.

    Dragging fields
    Dragging fields to the body of the form letter.

  7. Continue until you have composed the entire document. (See below for an example.) At this time you may wish to consider suppressing any blank lines that may appear in the resulting letters. If not, skip ahead to Step 7.
  8. Completed form letter
    The completed form letter.

  9. To suppress blank lines:
    1. Click at the end of the first paragraph to be suppressed and then select Insert > Fields > Other.
    2. Select the Functions tab and then click on Hidden Paragraph in the Type column.
    3. 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 delineate the condition.
    4. For example, in our Points database the condition to test if the Last Name field is empty would be: ![Points.Sheet1.Last Name] as illustrated in Figure 18.

    5. To test for multiple conditions use the operators AND and/or OR between the conditional statements, for example: ![Points.Sheet1.Title]AND![Points.Sheet1.Last Name].
    6. Click Insert, but do not close the dialog until all lines have been amended.
  10. The document is now ready to be printed. Click File > Print and respond with Yes in the resulting dialog.
  11. Mail Merge advisory dialog
    Mail Merge advisory dialog.

  12. 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.
  13. Mail Merge dialog
    The Mail Merge dialog.

  14. Click OK to send the letters direct to the printer.
  15. If you prefer to save the letters to a file, perhaps to allow proofreading or 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, instead of using the default Printer selection. This changes the dialog to display the Save merged document section, where Save as single document is pre-selected. You can choose to save each letter as a single, individual document, if preferred.

    In this case, clicking OK brings up the Save as dialog, where a file name can be entered for the saved letters. They will be saved consecutively in the single document, or numbered consecutively in individual files if saved as single documents.

    If you have not saved the original, prototype form letter document (template) previously, then you will be prompted to do so now by another Save as dialog. This could greatly simplify the creation of other form letters in the future and is highly recommended.

    Mail Merge Save as dialog
    Mail Merge Save as dialog.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools