Field codes: IncludeText field

Microsoft Office Word 2003

  • XML features, except for saving files as XML documents, are available only in Microsoft Office Professional Edition 2003 and Microsoft Office Word 2003.
  • If the source document is a Word document, you can edit the inserted text resulting from the INCLUDETEXT field and save the changes back to the source document. Edit the inserted text, and then press CTRL+SHIFT+F7.
  • The INCLUDETEXT field doesn't make use of OLE.
  • Security  Because field codes can be visible to anyone reading your document, be sure that the information you place in field codes is not information that you want kept private.

    ShowInstructions

    "FileName"
    The name and location of the document. If the location includes a long file name with spaces, enclose it in quotation marks. Replace single backslashes with double backslashes to specify the path, for example:

    "C:\\My Documents\\Manual.doc"

    Bookmark
    The name of a bookmark that refers to the portion of the Microsoft Word document you want to include.

    ShowSwitches

    \!
    Prevents Word from updating fields in the inserted text unless the fields are first updated in the source document.
    \c ClassName
    Here are file format converters provided with Word and their corresponding class names:

    WordPerfect version 6.x
    WordPerfect6x
    WordPerfect 5.x for Windows
    WrdPrfctWin

    \n
    Specifies a namespace mapping for XPath queries. This switch is required if the \x switch refers to an element by name in an XML file that declares a namespace.
    \t
    Specifies an XSLT for formatting XML data.
    \x
    Specifies the XPath for returning a fragment of data in an XML file.

    ShowExamples

    This field inserts the portion of the file referred to by the Summary bookmark:

    { INCLUDETEXT "C:\\Winword\\Port Development RFP" Summary }

    This field inserts the Name element of the XML document Resume.xml and applies the XSLT Display.xsl to it:

    { INCLUDETEXT "C:\\Resume.xml" \n xmlns:a=\"resume-schema\" \t "C:\\display.xsl" \x a:Resume/a:Name }