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
Short URL: http://fsmsh.com/2113
- 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
- 16052 reads
- Printer friendly version (unavailable!)




Two fantastic free software companies that make Free Software Magazine possible:
Tips!
Go and visit Worldlabel, a great free software company that helps you with Labels for your Mail Merge!
Buzz authors
Free Software news
- I ♥ reading planets - nothing better to get "inside" #freesoftware communities like !ubuntu http://ur1.ca/1uu6 or !gnome http://ur1.ca/6q3c
- autohokey, autohotkey download, free script, Free Software, 매크로, 매크로프로그램, 무료프로그램, 오토핫키, 유용한 프로그램, 좋은 유틸리티, 추천 매크로, 추천 유틸리티, 추천스크립트
- Two More Bills in the SCO Bankruptcy and Some Trademark Oddities
- Psystar Files Motion to Leave Chapter 11
- Swiss court: Gov can buy M$ licenses, but has to be aware of risk that contracts could be declared void during main process !freesoftware
Similar entries
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
2009: software installation in GNU/Linux is still broken -- and a path to fixing it
Tony Mobily, 2009-06-23 -
The Bizarre Cathedral - 44
Ryan Cartwright, 2009-06-08 -
Free Software Magazine caught in the 3fn shutdown crossfire
Tony Mobily, 2009-06-05 -
Is Android the key to the GNU/Linux desktop? Really?
Tony Mobily, 2009-06-12 -
The Bizarre Cathedral - 45
Ryan Cartwright, 2009-06-15
Hot topics - last 21 days
-
2009: software installation in GNU/Linux is still broken -- and a path to fixing it
Tony Mobily, 2009-06-23 -
The Bizarre Cathedral - 45
Ryan Cartwright, 2009-06-15 -
Will Google Wave revolutionise free software collaboration?
Ryan Cartwright, 2009-06-15 -
The Bizarre Cathedral - 46
Ryan Cartwright, 2009-06-22




