setTemplateSymbol

setTemplateSymbol

BASIC / ADVANCED / PREMIUM

Sets the character used to identify placeholder variables within a given template.

Description
public void setTemplateSymbol(String templateSymbol)

By default the Javadocx template variables have to be wrapped by dollar symbols ($).

You can change that symbol by any other you wish with the help of this method. It is, of course, convenient to use a symbol reasonably distinguishable from standard text characters.

Make sure that all variables in your template are surrounded by the symbol you have chosen.

Parameters

templateSymbol

The symbol you want to use for identifying placeholder variables within templates.

Code samples

Example #1

The resulting Word document looks like: