Suppress Blank Lines in a mail merge

Anonymous
2010-09-17T14:37:31+00:00

Using Word 2007, I am creating a mail merge. Some addresses have one line, some have two (Suite number, etc.) I want to suppress the second address field only if it is blank, so there are no blank lines in the document after I perform the merge. In older versions of Word, I remember a check box for "suppress blank fields" but I can't seem to find that in 2007.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Suzanne S Barnhill 279.4K Reputation points MVP Volunteer Moderator
2010-09-17T14:59:46+00:00

In general, blank lines are automatically suppressed, but only if they end in a paragraph break, not a line break. Consequently, the default is not a solution for me and perhaps not for you, either. So you have to use an IF field. Assuming your two address lines are the merge fields Address1 and Address2, you'd have something like this.

{ MERGEFIELD Address1 }<line break>

{ IF { MERGEFIELD Address2 } = "" "" "{MERGEFIELD ADDRESS2}<line break>" }

The way that will actually appear in your document is:

{ MERGEFIELD Address1 }

{ IF { MERGEFIELD Address2 } = "" "" "{MERGEFIELD ADDRESS2}

" }

By putting the line break inside the FalseText quotes, you ensure that thereis a line break only if the line contains text; otherwise, there will be no line.

Was this answer helpful?

10+ people found this answer helpful.
0 comments No comments

49 additional answers

Sort by: Newest
  1. Anonymous
    2013-07-12T15:30:30+00:00

    Ms Flintstone I think I've found the answer! I have had the same issue and yes it is very frustrating when it used to work fine in Word 2003.

    This is exactly what I did...

    Turn on the 'SHOW PARAGRAPH MARKS' icon which appears on the 'HOME' tab

    In my letter, I inserted a text box (I always do this, so I can add the mail merge fields into the text box, as it makes it a lot easier to move around when I'm trying to line the address up the window envelope. And it also stops the rest of the letter jumping around when an address is only a couple of lines long)

    Then, insert your address merge fields into this text box, but make sure you press the return key after inserting each address line, this ensures you get the paragraph marks after each line so MS WORD recognises your blank lines.

    Then, click inside the text box, hold down your mouse button and highlight/select all the merge fields. Click on the 'LINE AND PARAGRAPH SPACING' icon, also situated on the 'HOME' tab, and select 'Remove spacing after a paragraph (right at the bottom of the drop down window.)

    Finally, remove the paragraph marks by clicking the 'SHOW PARAGRAPH MARKS' icon once again.

    This worked for me, but only If I followed the order I mention up above.

    Hope it works for you!

    Richard

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-01-30T14:44:29+00:00

    Honest to God, this is driving me insane! I'm have the same problem and no the address box doesn't fix it and no using individual fields doesn't fix it! My data is clean, there are no gaps, I've 'Trimmed' any spaces that may not be visible, I've saved it as many different text documents, I've removed and bits of code not required, I've tried the trick from Tripster (which I was a bit excited about because i thought it might work) I've tried it in publisher but still i end up with a random line inserted into my nicely formatted address box! Pleeeeeeease, for the love of God Mr Gates, sort this out!! I could have and written the addresses by now!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-12-12T15:49:25+00:00

    Hi Folks

    Easily solved, just use the "Address Block" option on the Mailings tab. This puts the address data on your envelope, giving you choices as to the content, but does not display a blank line if the data is not present for a particular field.

    The size of the final text as well as font and line spacing can be changed afterwards. I would normally put a text box on my envelope, position the cursor within it and then click "Address Block". The text block allows the address to be positioned on the envelope.

    Best wishes, John

    Thank you...This was certainly the easiest solution.  Forget all those "hacks" that other users are posting.  This is the CORRECT and simplest way of solving this problem.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2012-08-02T16:32:08+00:00

    My thoughts exactly!

    Was this answer helpful?

    0 comments No comments