How Do I Use Clean Templates For Java Engine?

The CleanTemplates class is a batch tool that installs with the Java Engine, which allows you to clean a group of templates in order to convert them to a newer version of Windward.


This will update all tags to the mode desired, adjust selects to match the new auto-detect of select/value/evaluate, and remove the quotes on '${var}' if you have switched to set parameter (suggested).

The template file(s) is a path where the filename component can have wildcards. So it can be c:\templates\*.rtf. The output directory is the directory to place the cleaned templates in. It can be the same directory only if the file extension is changing, i.e. you cannot overwrite the template with a cleaned template.

If you do not list a data source the selects against that data source will not be changed. 


Always make a back up copy of your templates before using this tool.  

usage [options] template_file(s) output_directory.

Options are:

  -ps Substitution parameter mode.
  -pp Parameter Plus parameter mode. This is the default.
  -po Parameter Only parameter mode.
  -sq Smart quote OFF - remove quotes around ${vars}. The default is ON. Must be before -sql/xml.
  -ru Remove Unused styles, etc. OFF. The default is ON.
  -tt Text tags.
  -tf Field tags (macro in Excel).
  -tp Field Plus tags (macro in Excel). This is the default.
  -tc Content Control tags (macro in Excel).
  -v9 Use this option if the template you are cleaning was created in version 9 or earlier of AutoTag. Do not use this option if the template was created in version 10 or later. Setting/not setting this parameter correctly is very important.

Data sources are:


From the Command line

Here's and example of what you might type to make adjustments from the command line:

> java -ps -pp -po c:\full\path\to\template.docx c:\full\path\to\template1.docx c:\full\path\to\template2.docx c:\outputDir


Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.