Microsoft KB Archive/115613

-

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-cd, 2.0b, 2.0c

SYMPTOMS
In a mail merge where an ASK or FILLIN box should appear given certain conditions, the box appears for every record even when the merge conditions aren't met.

For example, in the following field, the FILLIN box appears for every record, even when the Gender field is "M":

{IF {MERGEFIELD gender} = "F" "{FILLIN "Mrs. or Ms.?"}" "Mr."}

CAUSE
This problem occurs because of the order in which fields update. The innermost fields are updated first. Thus, the FILLIN field is evaluated before the IF field.

RESOLUTION
Create a glossary entry for each condition.

Change the field to the following structure and create glossary entries that consist of the true condition text and the false condition text:

{GLOSSARY {IF {MERGEFIELD fieldname} = "test" "Glossary1" "Glossary2"}} For example, change the field to  {GLOSSARY {IF {MERGEFIELD gender} = "F" "Fill" "Mister"}} where "Fill" and "Mister" are names of glossary items. The Fill glossary item consists of "{FILLIN "Mrs. or Ms.?"}" (without the quotation marks) and Mister consists of the text "Mr." (without the quotation marks). To create the glossary entries:

  Type the text of the first glossary item. For example, type: {FILLIN "Mrs. Or Ms.?"}  Select the text. From the Edit menu, choose Glossary. In the Glossary Name box, type a name for the glossary item. Choose Define. Repeat steps 1-5 for the second glossary item.
 * }

-

Last reviewed: February 5, 1998

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.