Reporter > Publishing the results > Formatting the output in Microsoft Word > Changing the headers and footers used in the table of contents
 
Changing the headers and footers used in the table of contents
After you export a table from UNICOM Intelligence Reporter to a Microsoft Word document, each part of the table is mapped to its own style in Microsoft Word. For a list of the styles, see Default Microsoft Word export styles.
The table of contents in Word documents that are exported from UNICOM Intelligence Reporter is compiled from any text that is formatted in a style that is based on Word’s heading styles (Heading 1, Heading 2, or Heading 3). In the default template, the only style that this applies to is the Annotation LeftHeader style, which is based on the Heading 1 style. This style is used to format all text that appears in the left header of the table. This means that all text in the left header is included in the table of contents. All other header and footer styles are based on the Annotation style, which in turn is based on the Normal style, and do not appear in the table of contents.
The following example shows you how to display the table description in the Header Center annotation position instead of in the Left Header position, but still use the description in the table of contents. To do this, you need to change the content of the two annotation positions, and change the formatting used in the annotation styles in the Word template.
To change the header or footer used in the table of contents
1 Using UNICOM Intelligence Reporter, change the headers and footers so that the text that you want to appear in the table of contents is in the correct position. For example, remove the field {TableDescription \n} from the Header Left position, and add it to the Header Center position.
2 Export an example table to Word, specifying an output file name and folder in the Export File Name field in the Microsoft Word Exports dialog box.
3 When the export is complete you will see in the output folder, in addition to the exported Word document, a template file called WordTemplate.dot.
4 Open Word, then open WordTemplate.dot (do not open the .dot file by double-clicking on it as this would create a new document).
5 Open the Modify Style dialog:
From the Home tab in Word, expand the available styles under the Styles section. This opens the Styles dialog box.
From the Styles list, click the AnnotationCenterHeader style, click the down arrow and then click Modify.
6 In the Style Based On field, change the style from Annotation to Heading 1. This changes the formatting of the style, so you should also reset the font size and any other formatting to what it was before. Then click OK.
7 In the same way, select the AnnotationLeftHeader style and change the style that it is based on from Heading 1 to Annotation.
8 Save and close WordTemplate.dot. You can save this template in any folder (if you export to a folder and UNICOM Intelligence Reporter finds an existing WordTemplate.dot in the folder, it does not overwrite it, so your changes are not lost) but you may want to save it to the folder where all your other Word templates are stored, and give it a new name. If you rename the template and/or save it to a folder other than the output folder, you must explicitly select the template when you run the export.
9 Using UNICOM Intelligence Reporter, run the export again, using the TemplateFileName property of the Export object to specify the path and filename of the customized Word template. selecting your customized Word template in the Apply Word Template field of the Word Exports dialog box.
See also
Formatting the output in Microsoft Word