Blank Lines Not Suppressed During Conditional Mail Merge

Last reviewed: February 5, 1998
Article ID: Q116360
6.00 6.00a 6.00c 7.00 WINDOWS

The information in this article applies to:

  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, version 7.0

SYMPTOMS

When you perform a mail merge in Word for Windows, blank lines may not be suppressed when you use one of the standard conditional statements (using IF fields) in your mail merge main document. In both of the following examples, which contain conditional (IF field) statements, Word 6.0 does not suppress the blank line when the ADDRESS2 MERGEFIELD is empty (by contrast, these statements correctly suppress the blank line in Word 2.x for Windows):

Example 1

{MERGEFIELD NAME} {MERGEFIELD ADDRESS1} {IF{MERGEFIELD ADDRESS2} <> "" "{MERGEFIELD ADDRESS2}"}

Example 2

{MERGEFIELD NAME} {MERGEFIELD ADDRESS1} {IF{MERGEFIELD ADDRESS2} <> "" "{MERGEFIELD ADDRESS2} {MERGEFIELD CITY} {MERGEFIELD STATE} {MERGEFIELD POSTALCODE}" "{MERGEFIELD CITY} {MERGEFIELD STATE} {MERGEFIELD POSTALCODE}"}

Note: A similar problem occurs in which Word does not suppress blank SPACES for a conditional statement in a mail merge. For information about this topic, query on the following words in the Microsoft Knowledge Base:

   suppress* and blank and spaces and conditional and

STATUS

We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUNDS

In both of the methods below, [Press ENTER] means you should press ENTER to insert a paragraph mark (hard carriage return) inside the True Text element of the conditional statement. Do not press ENTER elsewhere; instead, allow normal line wrapping to occur.

The paragraph mark in the True Text element places the ADDRESS2 MERGEFIELD on a separate line only when it is nonblank (true result). Otherwise, when the ADDRESS2 MERGEFIELD is blank (false result), Word does not insert the paragraph mark. If you mistakenly omit the paragraph mark in the True Text element, Word displays and prints the blank space. The paragraph mark inside the True Text element is the only paragraph mark required in the conditional (IF) statement.

Method 1

{MERGEFIELD NAME} [Press ENTER] {MERGEFIELD ADDRESS1} [Press ENTER] {IF{MERGEFIELD ADDRESS2} <> "" "{MERGEFIELD ADDRESS2} [Press ENTER] {MERGEFIELD CITY}, {MERGEFIELD STATE} {MERGEFIELD POSTALCODE}" "{MERGEFIELD CITY}, {MERGEFIELD STATE} {MERGEFIELD POSTALCODE}"}

Note: You can include the MERGEFIELD fields for subsequent lines within the True Text and False Text elements of the conditional statement.

Method 2

{MERGEFIELD NAME} [Press ENTER] {MERGEFIELD ADDRESS1} [Press ENTER] {IF{MERGEFIELD ADDRESS2} <> "" "{MERGEFIELD ADDRESS2} [Press ENTER] "}{MERGEFIELD CITY}, {MERGEFIELD STATE} {MERGEFIELD POSTALCODE}

Note: In this method, only a True Text element is necessary; when there is no False Text element and the comparison is false, the IF statement has no result.

For more information about conditional statements, double-click the Help button on the Standard toolbar, and then type "if field" (without the quotation marks).

REFERENCES

"Microsoft Word User's Guide," version 6.0, pages 692, 694, 697-702


KBCategory:
KBSubcategory: kbmerge
Additional reference words: 6.00 6.00a mergefield conditional word6
word7 6.00c 7.00 word95 winword blank suppress mail merge
Keywords : kbmerge kbprint
Version : 6.00 6.00a 6.00c 7.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.