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: Oldest
  1. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2014-03-06T20:39:18+00:00

    That's the approach in the post marked as the Answer back on page 1 of this thread. The approach I've suggested is a simpler way of achieving the same outcome.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-10-23T16:40:08+00:00

    Thank you terelkfjlj.  This definitely worked.  I tried inserting the mergefields and it did not work. Thanks again.

    Was this answer helpful?

    0 comments No comments
  3. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2014-10-23T19:46:29+00:00

    Thank you terelkfjlj.  This definitely worked.  I tried inserting the mergefields and it did not work. Thanks again.

    That post has nothing to do with suppressing blank lines in a mailmerge. I'm glad it solved your problem, but the issue it actually addresses is quite different - it concerns the paragraph spacing between lines, which is a matter of basic document formatting (i.e. it's not even a mailmerge issue as such).

    Naturally, if the issue concerns document formatting, no amount of playing around with the mergefields will solve it.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-03-06T04:17:53+00:00

    Hi,

    A colleague has given what I hope is a definitive solution to this problem.

    1. Click on the Customize Quick Access Toolbar option on your Quick Access Toolbar. Click on "More Commands"
    2. From the dropdown list of "Choose Commands from:" select "All commands".
    3. Select Mail Merge Helper and click "Add >>" to add this to the Quick Access Toolbar.
    4. Click on the Mail Merge Helper on your Quick Access Toolbar.
    5. Under Option 3, you can see the options in effect. Click on the Merge button.
    6. Here choose " Don't print blank lines when data fields are empty", then Merge. It should now merge correctly.

    Regards

    Murray

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments