OOo Off the Wall: Fielding Questions, Part 4 - Mail Merges

 in
It takes a while to get the hang of mail merges, but OOo 2.0's new Mail Merge Wizard helps make them easier to use.

Mail merges are a means of using fields to create multiple copies of a document. They got their name because one of the most common uses for the tool is to address letters to different destinations. However, the same process can be used for other purposes as well, such as personalizing a form letter. If you choose, you even could use mail merges as a form of conditional text. Of all the uses fields have in OpenOffice.org Writer, mail merges is one of the most useful--and the most complicated.

In the version 2.0 beta, merges theoretically became simpler with the addition of the Mail Merge Wizard to the Tools menu. In practice, however, the wizard's usefulness is limited. It's designed specifically for merges that address letters or, assuming that you have Java Mail installed on your system, e-mails. Other merges still have to be done manually or with the older wizards for faxes, labels or business cards.

Figure 1. The Mail Merge Wizard is a new feature in version 2.0

Moreover, although you can puzzle through any of these wizards without fully understanding merges, you can use them more efficiently if you first try to do a few without a wizard. Working without the wizard helps you understand the three parts needed for a mail merge and how they work together.

The Parts of a Mail Merge

Mail merges require three separate documents:

  • The data source: a database, a spreadsheet or a Mozilla or Thunderbird address book that contains various information. In version 2.0, OOo refers to all these types of documents as databases, but keeping the distinction between data sources in general and true databases seems less confusing.

  • The source document: a Writer document with mail merge fields added from Insert > Fields > Other > Database. The mail merge fields are placeholders that indicate what fields from the data source are used. You can use other fields to signal how information from the source document should replace the mail merge fields.

  • The target document(s): a Writer document(s) produced when the mail merge is used. The target document(s) replaces the mail merge fields with information from the data source. Target documents are sent to the printer or saved as files.

Before you begin a merge, all three of these items need to be set up.

Registering a Data Source

Before you can use a data source, you must register it with OpenOffice.org. Prior to version 2.0, data sources were registered from Tools > Data Sources. However, as of version 2.0, they are registered using File > Tool > Database and a different interface.

In addition, in previous versions, the original data source file appears to have been registered with OOo. In version 2.0, information from the data source seems to be extracted from the source file to create a new database using the new Base format (.odb) in your home directory.

Figure 2. In version 2.0, the Database Wizard replaces the Tool > Database function.

To register a data source in version 2.0:

  1. Select File > New > Database. The Database wizard opens.

  2. Select the Connect to a New Database button. The Database Type drop-down field becomes available.

  3. Select the type of data source from the Database Type field. Almost any sort of proprietary or open-source database can be used, providing that it has either ODBC or JDBC connectivity. You also can use Thunderbird or Mozilla address books, spreadsheets and text files. Both spreadsheet and text files can be formatted in any manner supported by Writer, including MS Office files. A text file, however, requires a consistently used de-limiter to designate rows and columns. It is worth using only if you don't have another way to record data.

    If you are unfamiliar with databases and have under 1,000 records, a Calc spreadsheet probably is the most useful type of data source. You can use a spreadsheet with more records, but be prepared for delays in opening and saving the file.

    Click the Next button to continue.

  4. Enter the path to the data source. If it has a password, click the Password required box. Then click the Next button to continue.

  5. Click the Yes, register the database for me button, followed by the Finish button.

  6. Enter a name for the new database and then click the Save button.

The new database has been created and now is available for use.

______________________

-- Bruce Byfield (nanday)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

And mail merge to Thunderbird Please!!!!

Anonymous's picture

This feature would help so many people. It's been driving me crazy for months trying to do this.

Thunderbird Addressbook Connection

Darren V. Hart's picture

I have seen in mentioned on several places on the web that you can can use a Thunderbird addressbook in OO. I haven't been able to get that to work. In OpenOffice2 (1.9.129 - Ubuntu Breezy):

File->Wizards->Address Data Source

There is no option for a mozilla/netscape/thunderbird addressbook.

File->New->Database

Under connect to an existing databse there is no mozilla/netscape/thunderbird type.

Under OpenOffice 1.1 (1.1.5 - Ubuntu Breezy)
File->Template->Address Book Souce - just real database and textfile types
Tools->Datasources - Same as above

Tools->Mail Merge
From this document
OK
Address Data Source AutoPilot

There is actually a Mozilla/Netscape option here! I select it, click next and get this error:

The connection could not be established, Please check the settings made for the data source.

Clicking more has several fields:

Information - The connection could not be established.
Details - Please check the settings made for the data source.
Error - The connection to the external data source could not be established. No SDBC driver was found for the given URL.
SQL Status - "
Information -
Details - sdbc:address:mozilla

Is there an external sdbc driver I need to find and install or something? I haven' seen it mentioned in these tutorials anywhere.

Now if the OO developers coul

Anonymous's picture

Now if the OO developers could just create a mail merge function that didn't crash when doing large merges !!!!

Re: Now if the OO developers coul

Anonymous's picture

How large is large?

I've done mail merges that produced 500 copies.

Possibly, the number of merges you can do depends on system memory.

- Bruce Byfield

email output from mail merge

DebbyK's picture

Any chance there is a way to create an email output from this instead of sending to printer or a file? That's what I really need to do!

Debby Kilburn
Cerro Coso Community College

OOo's mail merge

Satish's picture

the article is very informative and use full
thanks a lot
from
N.Satish
NIIT Computers
Kadapa
9985016558

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState