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
    2015-10-14T20:59:58+00:00

    Bless you.   I knew it was there somewhere

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-04-10T13:57:48+00:00

    This is a different issue. If you need to change line spacing in a paragraph, you need to do so through the Paragraph dialog. Alternatively, there is a Line and Paragraph Spacing button in the Paragraph group on the Home tab and a Paragraph Spacing menu accessed via the Change Styles button in the Styles group.

    All versions of Word beginning with Word 2000 have defaulted to HTML paragraph spacing (a Compatibility Option setting), but that applies only to treatment of Spacing Before and After. What you are describing, I think, is the default paragraph spacing of the Normal style in Word 2007 and 2010, which is 1.15 line spacing, plus 10 points Spacing After. You do not need to use this; you can change the paragraph spacing and set the change as the default; you can even revert to Word 2003 styles entirely using Change Styles.

    But none of this has anything to do with how mail merge handles blank lines.

    This is exactly the problem - unwanted Paragraph Spacing settings were being inserted in a merged Mail Merge document that had not been set in the Main Document with the merge codes.  The issue has nothing to do with hiding blank fields from the data source using a conditional IIF statement.  In the main document I set the Paragraph Spacing controls (0 points Spacing After and Line Spacing as Single).   However, merging the document somehow overrides the Paragraph Spacing and the Line Spacing settings and the merged document shows the settings to be 10 points Spacing After and Line Spacing 1.15 which ruined the formatting.   Thank you for explaining that reverting to Word 2003 styles would prevent this from occurring.   Hopefully future versions will allow word merge to maintain the Paragraph Spacing and Line Spacing settings to remain intact when the using Mail Merge.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-04-09T14:54:02+00:00

    After years of trying to work this out, this has finally worked for me! Thanks John

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-03-25T20:19:43+00:00

    Merge fields - Name, Addr1, Addr2, City, State, Zip

    Word 2013

    With labels in a merge document, manual placement (paragraph breaks after each) worked fine but, with envelopes, manual placement (same) resulted in NO data after Addr1 if Addr2 was blank (at least in the preview).

    One way I found which worked was to remove all the manually placed merge fields and drop the address block field in making sure I matched fields.

    Another solution which worked for me was to paragraph break after (Zip), effectively a blank line following the merge fields.

    Was this answer helpful?

    0 comments No comments