WD: Err Msg: "Fields Are Nested Too Deeply" in Mail Merge

Last reviewed: February 18, 1998
Article ID: Q176881
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 98 Macintosh Edition

SYMPTOMS

When you use a nested IF field in a Word mail merge, you may receive the following error message:

   Fields are nested too deeply

CAUSE

This functionality is by design. Word supports field nesting only to 20 levels.

WORKAROUND

To work around this problem, use a nested IF field of 20 or fewer levels.

MORE INFORMATION

IF (If...Then...Else...) fields print information only if a condition you've specified is met. For example, you can use an IF field to create a form letter that goes only to clients who live within a particular ZIP Code area.

IF fields perform one of two alternative actions, depending on a condition you specify. For example, the statement "If the weather is sunny, we'll go to the park; if not, we'll go to the movies" specifies a condition that must be met (sunny weather) for a certain action to take place (going to the park). If the condition is not met, an alternative action occurs (going to the movies).

The following is an example of nesting MERGEFIELD fields 20 levels deep:

   {IF {MERGEFIELD FIELD1} <> "" "{IF {MERGEFIELD FIELD2} <> "" "{IF
   {MERGEFIELD FIELD3} <> "" "{IF {MERGEFIELD FIELD4} <> "" "{IF
   {MERGEFIELD FIELD5} <> "" "{IF {MERGEFIELD FIELD6} <> "" "{IF
   {MERGEFIELD FIELD7} <> "" "{IF {MERGEFIELD FIELD8} <> "" "{IF
   {MERGEFIELD FIELD9} <> "" "{IF {MERGEFIELD FIELD10} <> "" "{IF
   {MERGEFIELD FIELD11} <> "" "{IF {MERGEFIELD FIELD12} <> "" {IF
   {MERGEFIELD FIELD13} <> "" "{IF {MERGEFIELD FIELD14} <> "" "{IF
   {MERGEFIELD FIELD15} <> "" "{IF {MERGEFIELD FIELD16} <> "" "{IF
   {MERGEFIELD FIELD17} <> "" "{IF {MERGEFIELD FIELD18} <> "" "{IF
   {MERGEFIELD FIELD19} <> "" "{IF {MERGEFIELD FIELD20} <> "" "True"
   "False"}" "False"}" "False"}" "False"}" "False"}" "False"}" "False"}"
   "False"}" "False"}" "False"}" "False"}" "False"}" "False"}" "False"}"
   "False"}" "False"}" "False"}" "False"}" "False"}" "False"}

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q90393
   TITLE     : WD: How to Use Nested IF Fields in a Print Merge Document

For more information about conditional Word fields, see the appropriate help topic for your version of Word.

Word 97 and Word 98 Macintosh Edition

Click the Office Assistant, type "nesting if fields," click Search, and then click to view "Customize documents created with mail merge."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office Program or
               Component

Word 7.0 for Windows 95

On the Help menu, click Answer Wizard, type "nesting if fields," click Search, and then click to view "Customizing documents created with mail merge."

Word 6.x for Windows

On the Help menu, click "Search for help on," type "Merging," and then click the Display button. Click the "Mail Merge: Advanced Techniques," and then click the Display button. Under the "Using Word fields when merging documents" section, click "Inserting Word fields into the main document" topic, and then click the "Insert Word Field box" topic.

Word 6.x for the Macintosh

On the Help menu, click "Search for help on," type "Merging," and then click the Show Topics button. Click the "Mail Merge: Advanced Techniques," and then click the Go To button. Under the "Using Word fields when merging documents" section, click "Inserting Word fields into the main document" topic, and then click the "Insert Word Field box" topic.


Additional query words: mailmerge printmerge
Keywords : kbfield kbmerge macword ntword winword word8 word97 wordnt macword98
Version : MACINTOSH:6.0,6.0.1,6.0.1a; WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97; WINNT:6.0
Platform : MACINTOSH WINDOWS winnt
Issue type : kbprb kbinfo
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 18, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.