Adding an include file element

Use the include file template element to embed or link to external files from your report.

About this task

You can create a link to the file or physically embed the file into your output document-style report. However, include file elements are handled differently, depending on the output format and the location you are retrieving the file from.

Physically embedding files

About this task

When you select local or remote files:
  • For HTML and XSL-FO outputs, the included file is always a hyperlink.
  • For Microsoft Word output, when the including type is set to link dynamically, the Word field ({INCLUDETEXT FileName \* MERGEFORMAT}) is added instead of a link.

    Tip: A Microsoft Word document that links to other files is not self-contained. Moving the document-style report to other computers prevents you from visualizing the content of the linked document-style reports. If you need to visualize the content, use the Break links feature in Microsoft Word to include the contents of a linked file.

Procedure

  1. In the Palette view, select an Include file icon Include file element and drag it into the template content editor.
  2. In the Select a file window, choose a .doc, .docx, .txt, or .rtf file to include from a local or remote location:
    1. Select the Open local or remote tab.
    2. Click Browse, and select a file, and click OK.
    Tip: If you tend to always use the same tab to choose a file, select the Default to this view when working with files option. Then, the Select a file window always opens this tab.
  3. Select the Include file element in the template content editor.
  4. In the Properties view, select the Specific tab.
  5. In the Including type field, select Physically embedding to import the document-style report into the report during document-style report generation.
  6. Optional: In the Command field, enter a command to issue during document-style report generation.
  7. Click the Save icon to save your changes.

Dynamically referencing files

Before you begin

Important: Use physical embedding instead of dynamic referencing when:
  • A template or snippet is designed to extract information from a data source.
  • A template or snippet contains a dynamic reference.

About this task

When you dynamically reference files for Microsoft Word output, Engineering Publishing updates fields automatically during document-style report generation. If an INCLUDE TEXT field is generated, the macro did not run and the task of importing the file is delegated to Microsoft Word. An include file is not visible in the output document-style report until all fields are updated. To update the fields, use the Update fields property in the document specification, the Update Fields feature in Microsoft Word, or the macros that are contained in the PUB_install_dir\utils\word\rpe.dot style sheet.
Important:
  • Do not use the Update fields property when you are generating exceptionally large document-style reports. Large document-style reports might be unable to generate with the property set and could result in an out of memory error.
  • Do not run a macro to update the fields if you are referencing document-style reports from a secured location. The authentication process cannot be completed and causes the macro to hang.

Procedure

  1. In the Palette view, select an Include file icon Include file element and drag it into the template content editor.
  2. In the Select a file window, choose a .doc, .docx, .txt, or .rtf file to include from a local or remote location:
    1. Select the Open local or remote tab.
    2. Click Browse, and select a file, and click OK.
    Tip: If you tend to always use the same tab to choose a file, select the Default to this view when working with files option. Then, the Select a file window always opens this tab.
  3. Select the Include file element in the template content editor.
  4. In the Properties view, select the Specific tab.
  5. In the Including type field, select Dynamic link to create a link to the document-style report in its current location.
  6. Optional: In the Command field, enter a command to issue during document-style report generation.
  7. Click the Save icon to save your changes.