Appendix E Generating Documents Using Microsoft Word
© National Instruments Corporation E-5 DocumentIt User Guide
8. By default DocumentIt automatically includes all the SuperBlock
diagrams in the generated document. This is done by inserting
template function @include_img@ under every SuperBlock scope
where the image is to be included. The template mswgp.tpl is written
to handle only importing .emf files into the Word document. The
generated document has links to the .emf files in your local directory.
Whenever you update the graphics file, it will be automatically
reflected in your generated document.
@include_img@ is a template TPL segment defined in mswgp.tpl. This
segment contains the RTF commands to include a graphics file named
@sb_mangled_name_s@.emf. The @sb_mangled_name_s@ token is
filled in with the appropriate SuperBlock when you scope to a particular
SuperBlock. For details on .emf files and scoping SuperBlocks, refer to the
Template Programming Language User Guide.
A typical example to include SuperBlock 1 graphics into your document
would look like this:
@SCOPE SUPERBLOCK 1@
@include_img( )@
Changing the Generic Title Page
1. The document file that you have generated—in this case,
Controller_Logic.doc—includes a generic title page that appears
after it is imported into Microsoft Word, as shown in Figure E-1. If you
want to change the data on the title page or change the template TPL
commands, you can accomplish this in one of the three following
ways. Refer to the Using Your Own Templates section:
If you are familiar with Microsoft Word, load the mswgp.wrd file.
Word interprets the RTF in this file and displays the template
program commands along with chapter titles, section headings.
You can edit the title page in the first page and save the document
after you open the document in Word. All subsequent documents
generated by DocumentIt using mswgp.wrd continue to have your
new title page until you change mswgp.wrd again.
Using a text editor, you can edit the mswgp.wrd file. If you are
familiar with RTF format, you can search for title generation and
modify it there. You should make these changes to mswgp.wrd
before you generate the document from SystemBuild. All
subsequent documents generated by DocumentIt using
mswgp.wrd continue to have your new title page until you change
mswgp.wrd again.