Nested Merge with IncludeText Field Does Not Merge FileLast reviewed: February 5, 1998Article ID: Q119946 |
The information in this article applies to:
SYMPTOMSYou may receive several errors when you try to nest a merge field within the IncludeText field. (Note: For compatibility with earlier versions of Word for Windows, you can use Include instead of IncludeText.) If your document contains the following field
{IncludeText {mergefield <filename>}}where <filename> represents a field that contains a valid path and filename, and you select the View Merged Data option before merging your main document and data file, you will get the following error message:
Error! Not a valid filename"When performing the merge to a document or to the printer, you will receive the following error message
A field calculation error occurred in Record <record number>.where <record number> is the number of the record being merged. This error repeats for each record in the data document, and the resulting document will contain the message:
Error! Not a valid filenameIf you first merge to a new document (not to the printer), you can select the field in the merged document and press F9 to update the merge field. If the data record originally contained full path information (for example, C:\PATH\FILENAME), you will get the following error and you will not be able to include the document in your merge:
Error! Filename not specified!If the original data record contains only the filename and the file is in the current directory, the field will update at this point, without an error. This type of merge works correctly in Word version 2.x.
CAUSEAs the field updates, it reads the field braces of the nested field and interprets the braces as part of the path. Since field braces are not valid characters in a path, you receive the above errors.
STATUSMicrosoft has confirmed this to be a problem in Word versions 6.0, 6.0a, and 6.0c for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDIf the {mergefield <filename>} refers to data that contains a path, first format the field braces as hidden. Since you cannot select a single field brace without selecting the entire field, you must first format the entire field as hidden, then format the field type ("mergefield") and field instructions (the data field name) as not hidden. Use the following steps to do this:
|
KBCategory:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |