OpenOffice.org and mail merge: how to suppress the Address2 line
Getting rid of those pesky empty lines in OOo mail merges
Download the whole article as PDF
- 2007-06-20
- User space | Intermediate
-
Write a full post in response to this!
Mail merges are a great way to save time, since they pull information from the same fields, over and over again with each new record in your database. There’s only one problem—all records aren’t created equal; they don’t all have, or all need, the same fields. This article solves that perpetual problem with labels. If you’re already familiar with the problem, you can go straight to the solution entitled: Suppressing blank lines with sections step by step.
The problem of blank [Address2] lines
Some people live in houses; some in apartments. Some work in enormous campuses with mailstops or buildings in the address; others receive their work mail at a post office box.
Everyone knows this, of course. So why is this worth mentioning? Because it affects how you do mail merges when you send mail to these people. You’ll need all the relevant information for their addresses to print out on labels, or in the header of form letters. You want them to look like figure 1.
Some have a second line for the address; some don’t. That’s just the way that addresses are. This is reflected, of course, in the database. You create your database and, for each person, fill in the Firstname, Lastname, Address1, Address2, City, State, and Zip fields as appropriate. If there is no value for the Address2 field, you leave it blank.
So far so good.
Figure 2 shows what the labels template looks like when you set up your mail merge.
However, this is how your labels will look when they come out of the printer. And, while the post office certainly will deliver letters and packages addressed like this, it does look kind of goofy. (Think how much goofier if you had three address lines in your database.) See figure 3.
Nothing shows up where the empty Address2 value is. At least OpenOffice.org hides the empty Address2 field. That’s good. But OpenOffice.org doesn’t hide the empty carriage return, the empty line reserved for that field. That’s the problem: the carriage return is still there.
The solution to the blank address line issue
Anyone who’s researched how to suppress the blank Address2 line knows it’s a frustrating process. There are some solutions, but they don’t work that well, or they’re complicated, or they only work for letters, not labels. I haven’t tried them all but I concluded from the comments on various forums that we, as OpenOffice.org users, have not yet reached the promised land for this issue.
Here are two solutions. The first one is okay if you’re already using the mail merge wizard. The second one works under any circumstances for any templates.
An adequate solution for suppressing empty lines
Choose Tools→Mail Merge Wizard. In window 3, you’ll see this section (shown in figure 4) that lets you suppress any blank lines in the address block.
However, there are two disadvantages: 1) this is a very complicated, yet powerful, wizard; and, 2) it only works for letters, not labels.
The other solution is more elegant and simpler, if not blindingly easy. And once you’ve done it once, it’s very easy to repeat.
Overview of the best way to suppress any blank line
When I say “the best way”, that is of course my own opinion. But I think once you do it, you’ll see it’s reasonably slick. You can also use it for dozens of other purposes.
The key thing, remember, is to suppress the carriage return that’s associated with the empty field, not the empty field itself. The field is empty so it’s not going to show up, period.
You need to hide the carriage return after the <Address2> field IF the <Address2> field is empty.
I have tried to do this with the Fields window but couldn’t find a way to express a carriage return.
My solution is to use sections, as shown in figure 5.
Write a full post in response to this!
Similar articles
Do you like this post?
Vote for it!
Copyright information
This article is made available under the "Attribution" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by/3.0/.
Biography
Solveig Haugland: Solveig Haugland has worked as an instructor, course developer, author and technical writer in the high-tech industry for 16 years, for employers including Microsoft Great Plains, Sun Microsystems,and BEA. Currently, Solveig is a StarOffice and OpenOffice.org instructor, author, and freelance technical writer. She is also co-author, with Floyd Jones, of three books: Staroffice 5.2 Companion, Staroffice 6.0 Office Suite Companion and OpenOffice.Org 1.0 Resource Kit, published by Prentice Hall PTR. Her fourth book, the OpenOffice.org 2.0 Guidebook, is available from Amazon.com, from Cafepress, and directly from Solveig . For tips on working in OpenOffice.org or StarOffice, visit Solveig's blog: http://openoffice.blogs.com.
- Login or register to post comments
- 8852 reads
- Printer friendly version (unavailable!)




Best voted contents
-
The Bizarre Cathedral - 1
Ryan Cartwright, 2008-04-18 -
Free Software Magazine Awards 2008
Tony Mobily, 2008-04-22 -
Google App Engine: Is it evil?
Terry Hancock, 2008-04-24 -
The Bizarre Cathedral - 2
Ryan Cartwright, 2008-04-27
Similar entries
Buzz authors
All news
From the FSM staff...
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). A site about short stories and writing.
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
Installing an all-in-one printer device in Debian
Ryan Cartwright, 2008-05-05 -
What is the free software community?
Tony Mobily, 2008-03-29 -
Things you miss with GNU/Linux
Ryan Cartwright, 2008-05-01 -
Drigg (the pligg alternative) vs. Pligg: why should people switch?
Tony Mobily, 2008-04-13 -
How do you replace Microsoft Outlook? Groupware applications
Ryan Cartwright, 2008-03-20





Dedicated server