Blank Lines Not Suppressed During Conditional Mail MergeLast reviewed: February 5, 1998Article ID: Q116360 |
6.00 6.00a 6.00c 7.00
WINDOWS
The information in this article applies to:
SYMPTOMSWhen 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 STATUSWe are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDSIn 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:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |