Microsoft KB Archive/24758

Word Err Msg: “Unknown Field Name” During Print Merge

PSS ID Number: Q24758 Article last modified on 03-07-1997

=
========================================================= 1.00 1.05 3.00 3.01 3.02 4.00 MACINTOSH kbprint

= SUMMARY =

There are several possibilities for the Microsoft Word print merge error message “Unknown Field Name.” The general meaning of the error is that one or more field names in the data document do not match the field names in the main document. Check the following items:


 * 1) Make sure the field names in the data document are spelled exactly as they appear in the main document.
 * 2) Make sure there is a space between the DATA statement and the name of the data document. For example, make sure you have “<>” on the main document, not “<>”. If there is no space between these words, Word will not recognize the data document at all. Word will then produce an “Unknown Field Name” error for every field name in the main document.
 * 3) Make sure the DATA statement contains the name of the data document, not the name of the main document. The name of the data document must be spelled and capitalized exactly the same way in the DATA statement in the main document and, again, when the data document is saved.
 * 4) Do not put quotation marks around field names in the data document.
 * 5) Make sure that there is no paragraph return at the top of the document before the field names are listed.

= MORE INFORMATION =

Below are two infrequent but possible reasons for incorrect input that can cause the “Unknown Field Name” error in a Print Merge.

In the Word documentation about form letters and mailing labels, paragraph mark characters (backward “P’s”) appear at the end of each line in the illustrations showing what a data document should look like (see page 72 in the “Reference to Microsoft Word” version 4.0 manual and page 75 in the “Reference to Microsoft Word” version 3.0 manual for examples). Because of this illustration, it appears that these characters must be added to the document. However, these marks are included by Word when the RETURN key is pressed. If you enter paragraph marks in a data document by pressing OPTION+7, the “Unknown Field Name” error message appears because Word interprets these extra paragraph characters to be part of the field names. Check for this situation by going to the Edit menu and choosing Show Paragraphs. If there are two paragraph marks at the end of each line, delete the OPTION+7 characters at the end of each line, leaving just the paragraph marks that Word includes when you press RETURN.

In the Word documentation about form letters and mailing labels there is also a vertical bar, or cursor character, at the beginning of the first line in the illustrations showing what a data document should look like. (See page 72 in the “Reference to Microsoft Word” version 4.0 manual and page 68 in the “Reference to Microsoft Word” version 3.0 manual for examples). This character indicates where the insertion point was when the “snapshot” of the screen was taken for the illustration; however, it could be misinterpreted as a necessary print merge character. If you include a character to represent the cursor at the beginning of the data document, the “Unknown Field Name” error message appears because Word interprets the character as part of the field name. If this is the case, locate and delete this character.

KBCategory: kbprint KBSubCategory: kbmerge Additional reference words: macword macword5 ====================================================================== ============================================================================= Copyright Microsoft Corporation 1997.