Article ID: 211651 - Last Review: May 14, 2002 - Revision: 1.0

WD2000: Blank Space Appears If Field Is Blank in Mail Merge

This article was previously published under Q211651

On This Page

Expand all | Collapse all

SYMPTOMS

When you perform a mail merge in Microsoft Word 2000, a blank space appears and is printed if one field on a line is blank.

A common example of this situation is a line with three name fields, such as the following:
<<FNAME>> <<MI>> <<LNAME>>
In a record where all three fields are filled, the merged record spacing is correct, as in the following example:
Steven B. Levy
In a record where the middle initial field <<MI>> is blank, an extra space occurs in the merged record, as in the following example:
Fukiko Ogisu
NOTE: There are two spaces between the <<FNAME>> and <<LNAME>> results.

RESOLUTION

You can eliminate this extra space by using a conditional IF field, as in the following examples.

NOTE: To enter the field braces ({}), press CTRL+F9. To view the field codes of your merge fields, press ALT+F9.

Example 1

The following conditional MERGEFIELD fields remove the blank space if the middle initial field is blank. For example, given the following fields in a mail merge main document,
<<FNAME>> <<MI>> <<LNAME>>
the following conditional IF field eliminates a blank space caused by an empty middle initial field:
{MERGEFIELD FNAME}{IF {MERGEFIELD MI} <> "" "{MERGEFIELD MI} "}{MERGEFIELD LNAME}

Example 2

The following conditional MERGEFIELD field removes blank spaces in any field. For example, given the following fields in a mail merge main document,
<<Prefix>> <<FirstName>> <<LastName>>
the following conditional IF fields properly suppress the space normally included for any blank fields:
{IF {MERGEFIELD PREFIX}<>"" "{MERGEFIELD PREFIX }" }

{IF {MERGEFIELD FNAME}<>"" "{MERGEFIELD FNAME }" }

{IF {MERGEFIELD LNAME}<>"" "{MERGEFIELD LNAME }" }


APPLIES TO
  • Microsoft Word 2000 Standard Edition
Keywords: 
kbmerge kbprb kbfield kbfaq kbusage KB211651
 

Article Translations