Microsoft KB Archive/116360

From BetaArchive Wiki

Article ID: 116360

Article Last Modified on 8/16/2005



APPLIES TO

  • Microsoft Word 6.0 Standard Edition
  • Microsoft Word 6.0a
  • Microsoft Word 6.0c
  • Microsoft Word 95 Standard Edition



This article was previously published under Q116360

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.

WORKAROUND

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


Additional query words: 6.00a mergefield conditional word6 word7 6.00c word95 winword blank suppress mail merge

Keywords: kbprint kbmerge KB116360