Microsoft KB Archive/211651

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

Article ID: 211651

Article Last Modified on 5/14/2002

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q211651





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:

<> <> <>

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 <> is blank, an extra space occurs in the merged record, as in the following example:

Fukiko Ogisu

NOTE: There are two spaces between the <> and <> 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,

<> <> <>

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,

<> <> <>

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 }" }

Additional query words: mail merge merging extra spacing

Keywords: kbmerge kbprb kbfield kbfaq kbusage KB211651

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.