When you do mail merges, especially those involving addresses, some people have apartments and some don't.
If you are using an Address2 field in the address block, you need to hide that line if it’s empty.
Here’s how to hide any line. Let's assume here that the database I'm using for the mail merge is called nameslist_newcustomers.odb, that the table I'm using is just called Sheet1, and the address 2 field is called, well, Address2.
Get the mail merge document ready, with all the fields brought in. Be sure that you have the Address2 field, or the field you want to hide, on a line of its own, since the whole line, i.e. everything in that paragraph, will be hidden.
Click to the left of the Address2 field. (You can click anywhere on the line, but it’s simpler to always do it one way.)
Choose Insert > Fields > Other.
Click the Functions tab, then select Hidden Paragraph.
Type the following; the fieldname that might be empty is the fieldname you want to specify. This means everything on that line will be hidden if that field is empty:
Syntax: ![databasename.tablename.fieldname]
Example: ![nameslist_newcustomers.Sheet1.Address2]
Click Insert.
You won’t see anything appear; it will look like the picture below.
If you want to prove to yourself it’s there, click to the right of the Address2 field, press the left arrow once, and press space three times. You’ll see there are two fields, the hidden paragraph field and the regular Address2 field as shown on the right. Now press Backspace again three times so that you won’t have extra spaces in the document.
You’re all set. Now when you print the line that the hidden paragraph field is on will show only if there is a value for that record for Address2.
You're a gem! S-o-o-o simple! and I've been searching for a way to do that for some time. Thankyou.
Posted by: Ron Burling | June 01, 2010 at 01:51 AM
Glad it worked for you, Ron! Yes, it's realllllly not obvious. It is possible through the Tools > Mail Merge wizard but that one doesn't do labels and has a pain level all of its own so.....this I think overall is the simplest way to do it in labels.
Posted by: Solveig | June 07, 2010 at 01:22 PM