Find help fast by searching “xpressdox [command name]” in Google

The PaintInsertedText Command

The PaintInsertedText Command

Trouble shooting of templates can be enhanced by using this command.  The command searches the template for any fillpoint which directly inserts text into the assembled document, and “paints” it with the specified colour.

For example:

«PaintInsertedText(Yes,Red)»

Hello. My name is «Name».  You killed my «ToUpper(Parent,1)». Prepare to «Action».

Depending on the values entered by the user in the interview, the assembled sentence would render as this:

Hello. My name is Inigo Montoya.  You killed my Father. Prepare to die.

In the XpressDox ribbon menu Common Tools is an entry called Find Inserted Text.  Pressing this repeatedly will cause the Word selection to cycle through all the text coloured by this command.

Allow the user to choose whether to paint the inserted text or not

Although this command is obviously useful for the template author to use for trouble shooting, it can also be useful for the end user. For example, the user running a contract template might like to see easily what text has been inserted as a result of the answers provided in the interview. And then when they are happy, produce a final assembly without the highlighting.

If the end user were a template author, they could just remove the command (or disable it with «PaintInsertedText(No,Red)»).

But for a user who is not a template author, modifying the template is not an option. However, the template author can make it possible for the end user to decide whether or not to highlight the inserted text.

To illustrate how the template author could give the user the option to paint the inserted text, or not, this code snippet could be used:

«ChooseUsingCheckBox(Paint,Y,N,N)»«Caption(Paint,Check here if you want the inserted answers to be highlighted)»
«PaintInsertedText(Yes,Blue,Paint = 'Y')»
Hello. My name is …