Customizing Word-based output documents

From UPK wiki
Jump to: navigation, search


The content of the Word-based output documents is controlled by a file called PrintTemplate.docm, which can usually be found inside the language folder within the Publishing Style package. This file is very temperamental and it is easy to make an innocuouos change that causes the file to stop working altogether. So be very careful in your changes. It is recommended that you make small, incremental changes, fully testing, saving, and checking-in the changes with each increment. In this way, when it does go wrong, you won't lose too much.

Using bookmarks

The PrintTemplate.docm file relies on the use of Word bookmarks to insert UPK-related information. UPK 9.1 introduced a new menu bar that can be used for inserting many of the common bookmarks, but there are many, many more that you can use.

Tip: When manually inserting a bookmark, enter some placeholder text, and put the bookmark around this. Otherwise, UPK does not always insert the bookmark text correctly. Also, if you are inserting the bookmark text on its owwn line, make sure that you do not include the paragraph mark inside the bookmark brackets. Otherwise, UPK will replace the paragraph mark when it replaces the bookmark text. For example:

[System Process Revision]¶

Here, System Process Revision is text entered into the Word document. We have then selected this same text (but not the following paragraph mark) and inserted a bookmark for this. The bookmark text we used (not visible here) is SPDRevision. At generation time, the text System Process Revision will be replaced with the value of the System Process Document > SPD Revision property for the Topic.

Personal tools