Output File

/of="path and file name"

The Output File option causes HotDocs to assemble the document and save it using the file name you specify. If you are using the Answer Summary or Question Summary options, the Output File option specifies the name for either of those generated documents. This is useful if you know you want to save an assembled document every time that HotDocs finishes assembling that document.

Changing the file extension on the file specified in the Output File option instructs HotDocs to convert the output file to the new file type. For example, adding the command line option /of="C:\templatename.docx" to an RTF template results in a DOCX format output file.

Since HotDocs cannot convert to all format types, we recommend that you manually test HotDocs conversion capablities for a desired format before adding the command-line option. Be aware as well that converting output files to alternate formats can sometimes cause variations in formatting and user experience.

If you use this option with the command line, be sure to include the Template File (/tf) option.

Limitations When Using /of with /nw

Normally, the file extension on the file specified in the /of command line switch instructs HotDocs to convert the assembled document to a file of that type after assembly. However, when converting to PDF, this only works when the assembly window is visible. When you hide the assembly window (by using the /nw switch), conversion to a PDF document is not supported. HotDocs does, however, save the assembled document to a file with a .PDF extension as instructed by the /of command line switch. This can be confusing if you specify “tf=template.docx /of=document.pdf” in the command line after using a /nw switch. In this case, HotDocs assembles a DOCX document from the DOCX template, but saves the DOCX document iin the file system with the filename specified by the /of switch (document.pdf).  If you then double-click that file in Windows Explorer, the application mapped to the PDF file extension (usually Adobe Reader) tries to open the file but fails because the file contains a DOCX document, not a PDF document (as the file extension claims).

In cases where the assembly window is hidden by specifying the /nw switch, only native word processor file types are supported for the /of commandline switch, as follows:

Template type Allowed output file
DOCX DOCX
RTF RTF, DOCX
DOT RTF, DOCX

Work Around

A possible work around is to use Microsoft Word's PDF conversion feature to accomplish the same result,  using either Word's graphical user or programming interface.