WD: "Cannot Open File" Error in INCLUDETEXT Field

ID: Q122193

The information in this article applies to:

SYMPTOMS

When you insert an INCLUDETEXT field in a Microsoft Word document, the following error message appears in place of the field results:

   Error! Cannot open file.

CAUSE

When you manually insert an INCLUDETEXT field in your document, and the path has a space in the folder or file name, this error occurs if you do not enclose the path and file name in quotation marks.

WORKAROUND

You must enclose the file name argument for an INCLUDETEXT field in quotation marks if there are spaces in any part of the path or file name.

Example of Incorrect IncludeText Field:

     In Word for Windows - {INCLUDETEXT c:\\my documents\\test.doc}
     In Word for Macintosh - {INCLUDETEXT Macintosh HD:documents:test}

Example of Correct IncludeText Field:

     In Word for Windows - {INCLUDETEXT "c:\\my documents\\test.doc"}
     In Word for Macintosh - {INCLUDETEXT "Macintosh HD:documents:test"}

Additional query words: fields documentation error
Keywords          : word8 kbfield macword98 winword macword word6 word7 word95 
Version           : MACINTOSH: 6.0; WINDOWS: 7.0, 7.0a
Platform          : MACINTOSH
Issue type        : kbprb

Last Reviewed: December 6, 1998