Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Creating a New HotDocs Template

HotDocs Developer, which must be available on your computer in order to edit document templates, is needed to test and compile the template for upload into Suite.

þÿIf the macro security setting in your word processing program is set to high, you will not be able to edit a HotDocs template. Change the setting to medium. Ask your System Administrator or IT department if you need instructions.

To Create a New Library:

The first step in HotDocs Developer is to create a library that will contain all the templates files.

  1. Create a folder on your computer to temporarily hold the template files.
  2. Open HotDocs Developer .
  3. On the HotDocs Developer window, click the btn_New_Library New Library button.
    þÿ
  4. On the New Library dialog box, type a name in the File Name field (such as “eCounsel”), then press the <TAB> key twice to add the library extension to the filename and populate the Title field. Click OK.
    þÿ

To Create a New Template:

Next, a new template can be created that will reside in the library.

  1. On the HotDocs Developer window, click the btn_New_Template_HotDocs New Template button.
    þÿ
  2. On the New Template dialog box, change the type to Word RTF Template (.rtf).
  3. Type a file name, and then press the <TAB> key twice. Replace the title if needed, and type a description.
  4. Leave the initial contents as Empty unless you have a current file to use.
  5. Click OK. Microsoft Word will open a new document with the file name specified.
    þÿ

To Create Variables for the Template:

When creating variables for Secretariat, use the HotDocs Variables for Secretariat Document Assembly technical note for a list of available variable names. Also, any custom variables created for your company can be added using these steps.

  1. On the HotDocs Developer window or HotDocs ribbon for the new template file in Microsoft Word, click the btn_Component_Manager Component Manager button.
    þÿ
    The first variable that must be created is a select variable that is used with Secretariat to allow the user to select a record on which the output is based. Available variables include SelectSecretariatEntity and SelectSecretariatPeople. Each of these will open a list dialog box to select an entity or person, respectively.
  2. On the Component Manager dialog box, click the HD_btn_New_Component New Component button.
    þÿ
  3. On the New Component dialog box, leave the Component type as Text Variable, and click OK.
    þÿ
  4. On the New Text Variable dialog box, type “SelectSecretariatEntity” as the variable name, and then type “Select Entity” as the title (this text appears on the dialog box when preparing the document in Secretariat). Optionally, type the text that will appear as a tooltip when running the template. Click OK.
    þÿ
    The new variable will appear in the Component Manager dialog box.
  5. Repeat Steps 2-4 for each variable that you want to use.
    þÿAll variables provided by Mitratech are text variables with the exception of any variable that ends with “_datetype”. For variables ending with “_datetype”, select the Date Variable component type.
    þÿFor subsequent templates, copy the variables from a component file by clicking the right arrow in the upper-left corner of the Component Manager dialog box. This button expands the dialog box and allows you to open a component file to select variables to copy.
  6. Select one or more variables from the existing component file, then click the left arrow to move them to the new component file.
    þÿ
  7. Click HD_btn_Save Save to save the component file.
    þÿ

To Add Variables to the Template:

Once you have created the variables, it’s just a matter of dragging-and-dropping the appropriate variable onto the Microsoft Word document.

  1. In the template file in Microsoft Word, first drag the appropriate select variable from the Component Manager dialog box onto the template.
    þÿ
  2. Next, type the text that you want to appear in the finished document.
  3. Where needed, drag additional variables onto the template file.
    þÿ

þÿTo change properties of a Mitratech-provided HotDocs variable, simply double-click the variable name in the word processor to open the Variable Field dialog box. From this dialog box, you can change the formatting for the value.

For example, if a variable includes a forced return as part of the variable, you can specify to remove the forced returns. On the Variable Field dialog box, click the clear the checkmark from the Use default checkbox and click on the Non-breaking checkbox to select it.

þÿ

þÿ  Do not change the Variable Type of any Mitratech provided variable. Doing so will cause a data type mismatch and render the template unusable.

To change a date format, clear the Use default checkbox, and select a format for the date.

HD_db_Variable_Field_Date_Format

To Create REPEATS and IF Statements:

In order to return multiple records in the document, you must use a REPEAT field. Within the REPEAT field, you also can specify an IF field to filter the data that is returned.

  1. In the template file in Microsoft Word, click the REPEAT field button on the HotDocs ribbon.
    þÿ
  2. On the REPEAT Field dialog box, leave the field type as REPEAT Dialog.
  3. Click the HD_btn_New_Dialog New Dialog button to the right of the Dialog menu.
  4. On the New Dialog dialog box, type a name for the dialog variable, drag-and-drop any components to the contents list box, and click OK. Note that any field used in an IF field to filter the results must be included in the dialog.
    þÿ
  5. Click OK.
    þÿ
  6. In Microsoft Word, place the cursor between the REPEAT and END REPEAT statements, and click the IF Field button on the HotDocs ribbon.
    þÿ
  7. On the IF Field dialog box, click on the IF Expression option. Create an expression that can be used to filter the results by dragging and dropping items onto the text box. Click OK when finished.
    þÿ
  8. In Microsoft Word, place the cursor between the IF and END IF statements. Add the variables that you want to appear in the completed document. If multiple variables are placed on the document, make sure to include any punctuation to be included.
    þÿ

þÿ Multiple IF statements can be specified as criteria for the results by using an AND or OR operator within the IF statement. For example, the following statements return a player name and primary address for a player with the role of “Partner” with no end date specified (notice that the additional lines of address only appear if they have data):

þÿ

This construct returns the following with test data:

þÿ

To Retrieve Data from User Fields:

For people and entities in Secretariat, you can include user fields in your assembled documents provided you construct your HotDocs template to retrieve the applicable values for the user field. The Mitratech provided variables include a “_userfieldprofileid” variable for each of the modules. The profile identifier can be determined in the User Fields component of Suite Manager as follows:

þÿ

For tabs with single record (such as the Patent tab above), the HotDocs template need only contain an IF statement to specify the user field to return the value and the variable for the value itself.

þÿ

For multiple record tabs, the HotDocs template must be constructed carefully to only return the user field values that are applicable. For example, retrieving data for a particular player on a matter would require a more complex series of IF statements to ensure that the user field value being returned is the data for the player.

To Save the Template:

  1. When you have finished editing the template in Microsoft Word, click the btn_Save Save button on the HotDocs ribbon. Do not save the document using the Microsoft Word save functionality.
    þÿ
  2. Close the document; again using the btn_Save_and_Close Save and Close button on the HotDocs ribbon not the word processor ribbon.
    þÿ

To Prepare the Template for Upload:

  1. On the HotDocs Developer window, click the btn_Component_Manager Component Manager button.
    þÿ
  2. On the Component Manager dialog box, click the btn_Component_Manager_Properties Properties button.
    þÿ
  3. On the Component File Properties dialog box, click on the HotDocs Server tab, and verify that the Enable template for use with HotDocs Server checkbox is checked. If not, click in the checkbox to enable it. Click OK.
    þÿ
  4. On the Component Manager dialog box, click the þÿ Save Component File button.
  5. Close the Component Manager dialog box.

To Test the Template:

  1. Right-click on the template in the left pane of the HotDocs Developer window, select Test in Browser from the popup menu, and select JavaScript.
    þÿ
  2. On the Answer File dialog box, click OK.
    HD_db_Answer_File
  3. The Interview wizard will start. This wizard prompts the user for information for template variables that it was unable to fill from the database. At this time, do not enter any information; click þÿ Finish.
  4. Click OK on the message box that unanswered questions remain.
    þÿ
  5. Click Don’t Save on the message box asking to save changes to the answer file.
  6. The document will open again. Close the document without saving.

To Publish the Template:

  1. On the HotDocs Developer window, click the Tools menu and select the Publishing Wizard menu command.
  2. On the Publishing Wizard dialog box, click the Template files for use with HotDocs Server option.
  3. Browse to a location to create the published files or enter a location in the Local folder for published files text box, and click Next.
    þÿ  Do not use the location of the templates for publishing but create a new subdirectory.
    þÿ
  4. 4. On the File Security screen, click Next.
  5. On the Additional Files screen, click Finish.
  6. On the confirmation message box, click OK.
    þÿ
  7. Locate the new files created from the steps above (<NewFileName>.CMP, <NewFileName>.RTF, and<NewFileName>.RTF.MANIFEST.XML). These files should reside in the directory specified in Step 3.
  • Was this article helpful?