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: Most helpful
  1. Anonymous
    2012-08-02T16:32:08+00:00

    My thoughts exactly!

    Was this answer helpful?

    0 comments No comments
  2. Suzanne S Barnhill 279.4K Reputation points MVP Volunteer Moderator
    2012-07-26T15:49:33+00:00

    The layout of the Address Block can be customized.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-07-26T13:15:05+00:00

    I had a customer with the same problem in Office 2010, i got round this be creating the mailmerge again and saving as a doc file in word 2003.  Then they were able to run the mailmerge fine

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-05-03T18:56:20+00:00

    Besides the description for "/f" says:

    "Specifies the text to be inserted after the mergefield if the mergefield is not blank"

    It says: "if the mergefield is NOT blank" - the issue is that the field potentially IS blank.

    Was this answer helpful?

    0 comments No comments