HotDocs Developer Help File
Place your cursor in the opening or closing instruction and press Ctrl+M. HotDocs
moves your cursor to the matching instruction. (You can also choose Match
IF/REPEAT from the shortcut menu.)
Place your cursor in the opening or closing instruction and press Ctrl+Shift+M.
HotDocs highlights the entire section of the instruction with which you are working.
(You can also choose Select IF/REPEAT from the shortcut menu.)
For details, see Use the Script Editor.
For details on working with instructions in a text template, see Match Opening Instructions
with Closing Instructions.
Merging check boxes in a Text Template
I know how to automate check boxes in my form templates, but I'm unsure of how to
create check boxes in a text template.
Some fonts on your system include empty box characters, as well as box characters with
an X. You simply need to conditionally insert these characters in your template. For
example, if you have the Wingdings 2 font installed on your computer, you can complete
the following steps to merge these characters.
To create check boxes in a text template
1. Automate your template, including specifying the conditional instructions that will
merge the correct check box. (Use placeholder characters to represent the check
2. Open the Windows Character Map tool. (For instructions on finding and opening
this tool, refer to your Windows Help.)
3. Click the Font drop-down button and choose Wingdings 2. The character list
changes to show the different characters available to you.
4. Locate a box with an X in it and click Select. This adds the character to the
Characters to copy field.
5. Locate a box without an X in it and click Select. This adds this character to the box
6. Click Copy.
7. In the template, place your cursor where the check boxes should go and choose
the Paste command (for example, press Ctrl+V). The characters are inserted in
your template. (You may need to highlight the character and choose Wingdings 2
from the application's font menu to reapply the correct font.)
A simpler way to merge check boxes may be to place either an X character or empty
space character between opening and closing brackets. For example, [X] vs. [ ].
Merging Just a Portion of a Date Instead of the Whole Date
I need to merge just the year part of a date in an answer field—not the whole date. How
can I limit the answer in this way?
You can use an example format to merge just a portion of the date. The user will still enter
a full date, but only a portion of it will be merged in the document.
To merge the year only
1. Create a Date variable. (See Customize a Date Variable.)
2. At the Format field (either at the Variable Field dialog box or at the Date Variable
Editor), enter 1990.
Using example formats, you can merge a single Date variable in three separate answer
fields. For example, say you are automating a form template and the date needs to
appear on three separate blank lines. You can merge the same Date variable in all three
blank spaces, but use different portions of a date format to control what gets merged in
each blank space.
For example, in the following, you'd break the dates into three separate parts:
In the first blank space, you'd merge the Date variable with the format third. In the second
blank, you would use June as the format. In the last blank, you'd use 1990 as the format.
Optional Variables Showing Up as Unanswered in Interview and Document
My template provides an option for users to enter a second address line. However, when
users don't have a second address, HotDocs is merging an unanswered variable marker
in the document. It's also reporting in the End of Interview dialog that some questions are
unanswered. How can I keep these markers and warnings from appearing?
To keep HotDocs from merging an unanswered variable placeholder, you must insert the
variable conditionally. Specifically, you must insert it only if the variable is answered. For
example, the following expression in the template will merge the second address only if
the user provides it:
«Client Address 1»
How to C#: Preview Document Content Using XDoc.Word
How to C#: Preview Document Content Using XDoc.Word. Get Preview From File. You may get document preview image from an existing Word file in C#.net. can't copy text from pdf; extract text from pdf file using java
HotDocs Developer Help File
«IF ANSWERED(Client Address 2)»«Client Address 2»«END IF»
«Client City», «Client State» «Client ZIP Code»
To keep HotDocs from warning the user that the question in the dialog is unanswered, you
specify a variable property. At the Variable Editor, click the Advanced tab and clear
Warn when unanswered. (See Control How HotDocs Processes a Variable.)
Punctuating a Repeated List of Answers
I have created a REPEAT instruction in my template, but when I test it, the answers all run
together, for example, like Answer OneAnswer TwoAnswer Three. How can I separate
these answers with the correct punctuation and conjunction?
You can assign a format to a repeated list of answers. This format separates answers with
either commas or semi-colons, and it also inserts the conjunction AND or OR, depending
on your needs. To assign the format, at the REPEAT Field dialog box, click the Format
drop-down button and choose the punctuation style you need.
For instructions on assigning a format in a computation script, see Punctuate a List Using
a Computation Variable.
Receiving 'Invalid Variable Name' Errors When Creating Components
When I create a new variable and try to save it, HotDocs displays an Invalid Variable
Name error message. What am I doing wrong that causes this error to appear?
When naming variables, there are a few rules you must follow:
A variable name can have up to 50 characters, including letters, numbers, and
The first character in a variable name must be a letter.
Each variable name must be unique. Even if the variables are different types, their
names cannot be identical.
Do not use all uppercase letters in your variable names. Because HotDocs
instruction and expression keywords use uppercase letters, you may inadvertently
use a word that may someday become a keyword, which will prevent HotDocs
from reading your variable name correctly. (See Introduction: Instruction and
Do not use any of the following characters when naming your components:
$ (dollar sign)
" (quotation mark)
[ ] (brackets)
( ) (parenthesis)
These characters can be used only if there is a character other than a space
immediately before or after it:
/ (forward slash)
> < (greater than and less than signs)
>= <= (greater than or equal to and less than or equal to signs)
!= (does not equal)
Reducing Template File Size
I completed automation on my template and now the template's file size is several
megabytes. What can I do to reduce the file size?
Most likely the increased file size is because you've used graphics in your template. When
you insert a graphic in an RTF template, Word creates an extra copy of the graphic and
merges it in the file. Other causes may be invisible merge ID marks and unused property
HotDocs Developer Help File
You can keep Word from storing all of this information in the template. See Using the
Hidden Data Remover dialog box for details. You can also remove existing hidden data
from your templates. For details, see Remove Hidden Data from Word Templates.
Renaming Components Correctly
I renamed a component in my component file, but now my template won't assemble. I
keep getting 'unrecognized variable' errors.
When you rename a component, it is changed everywhere it is used in the component file.
For example, renaming a variable will update all references to it in dialogs, scripts, and
prompts. However, you must update references to the component in the template text
itself for the template to continue to work. To do this, you may need to remove the old
variable field and insert the new variable. See Rename Components in a Single Template
You can use Template Manager to rename components. If you do, all references to the
component—both in the component file and in the template—will be updated. See
Rename Components Across Multiple Component Files for details.
Repeating a Single Variable in a Dialog
I have a dialog that contains several related variables. I want to repeat one of the
variables in the dialog but not all of them. How do I do this?
To repeat a single variable in a dialog that contains other variables, you must effectively
create two dialogs and then nest the repeated variable's dialog in the non-repeated dialog.
1. Create a dialog for all of the non-repeated variables. (See Gather Questions into a
2. Create a dialog for the repeated variable and assign Spreadsheet on Parent as
its repeat Style. (See Choose a Presentation Style for the Repeated Dialog.)
3. Edit the non-repeated dialog and drag the repeated dialog to its Contents list.
See Insert Dialogs Into Dialogs and Create a List Within a List for more details.
Repeating the Contents of a Single Cell in a Table
I have a table. I need to repeat the contents of a single cell. I've added a REPEAT
instruction to that cell, but when I assemble the document, it creates new rows for each
repetition. How can I create the list in a single cell and not repeat the entire table?
When you place a REPEAT instruction directly in a table, it will repeat each row of the
table. To repeat the contents of a single cell, you must create a REPEAT instruction in a
computation script and then insert that Computation variable in the cell. See Create a
REPEAT Instruction Using a Computation Variable.
Test Assembling Template with ASSEMBLE Instructions
When I try to test assemble my template, the ASSEMBLE instruction in the template
You cannot test an ASSEMBLE instruction from within the template—you must first close
the template and then assemble it from the library. See ASSEMBLE "FILENAME" for
Trying to Save an Invalid Computation Script
When I try to save my Computation variable, I instead get an error message and HotDocs
won't let me exit the script. I need to work on other projects, but I don't want to cancel and
lose all of my work on this script.
HotDocs will not let you save an invalid computation script. However, you can 'disable' the
script and save the variable. Disabling the script keeps HotDocs from trying to validate it
when you save it.
There are two ways to disable a script:
Highlight all of the text in the script and click the
Comment Block button. This
turns all of the text in the script into a comment, which HotDocs won't process.
When you are ready to work on the script again, highlight the text and click the
Uncomment Block button. This enables the script once more.
HotDocs Developer Help File
Comments are descriptions or remarks about the computation script. Many
developers enter comments to explain how they are using instructions and
expressions in the script to achieve the result they are seeking.
At the beginning of the script, enter the instruction QUIT. This instructs HotDocs to
not process any of the script after the instruction.
Understanding the Difference Between Multiple Choice Options and Merge
What is the difference between a Multiple Choice option and merge text?
There are actually three parts to a Multiple Choice variable:
Options: Multiple Choice options are the actual possible answers to the variable.
When an option is selected, it is the value that is saved in the answer file.
Prompts: Prompts are the text used to describe the options. For example, if your
option text isn't descriptive enough, you can enter a prompt for the option and the
prompt will be used in the interview. (If you don't enter a prompt, HotDocs will use
the Option text.)
Merge Text: Merge text is the text that gets merged in the document, based on
the options the user selects. (If you don't enter Merge Text, HotDocs will merge
the Option text in the document.)
See Customize a Multiple Choice Variable for details.
Using DEFAULT Instruction Causes Extra Repetition
I have a DEFAULT instruction in my repeated dialog script, but it's causing an
unanswered repetition to appear in my interview outline. This causes unanswered
questions to appear in the document, as well. What do I do?
Do not use the DEFAULT instruction in the script of a repeated dialog unless the
instruction is used in conjunction with a conditional expression or a LIMIT instruction. If
you use it by itself in a repeated dialog script, it will always add an unanswered dialog to
the interview, which will produce an incorrectly assembled document.
See DEFAULT VAR TO VALUE for details.
Using Headers and Footers of Inserted Templates
I have several inserted templates, each with their own defined headers and footers.
However, when they are inserted in the parent template, the headers and footers are lost.
How can I keep the headers and footers from being overwritten?
When working with inserted templates, you can select an option that uses the headers
and footers of the inserted template when the template is merged in the main document. If
the text is merged "inline" with the rest of the main document, the inserted template's
headers will overwrite the main document's headers. If the inserted template is merged as
a separate section of the main document, each section will use the headers defined for it.
See Define Headers and Footers in Inserted Word Templates for details.
Using INSERT Instructions in a Table
I've placed an INSERT instruction in a word processor table, but when I assemble the
document, the inserted text appears outside the table.
You cannot place INSERT instructions in the cell of a word processor table.
Using One Variable in Two Different Dialogs
I have a template where I need to ask one of two dialogs, based on how users answer
other questions in the interview. I have one variable that needs to appear in both dialogs.
How can I link the variable to both dialogs without breaking my template?
As long as only one dialog gets asked during the interview, you can associate the variable
with both dialogs. To do this, however, you will need to select some dialog options. You
will also need to explicitly (but conditionally) ask both dialogs.
To associate the variable with both dialogs
1. Create the first dialog and add the required variables to it, including the variable
you need to share between the two dialogs.
2. At the Dialog Editor, click the Options tab.
3. Clear Link variables to this dialog and click OK.
HotDocs Developer Help File
4. Create the second dialog and add the required variables to it, including the
variable you've already added to the first dialog.
5. Either in a Computation variable or directly in the template, insert two ASK
instructions—one for each dialog.
6. Condition the ASK instructions accordingly.
See Use the Same Variable or Clause in Two or More Dialogs for more information.
Variables Not Working in Word Text Boxes
I have a text field with a variable inside of it in my Word template. However, when I
assemble the document, the variable isn't processed.
You cannot insert variables inside Word text boxes. Alternatives to using text boxes may
include creating a single table cell to place your variable, or implementing a frame (Word
XP). Refer to Microsoft Word's help file for specifics on creating these types of boxes.
Can't Attach Answer File or Document to Outlook 2007 E-mail Message
When I try to attach an answer file or an assembled document file to an e-mail message,
HotDocs displays the following error message: "Error Sending Message. One or more
unspecified errors occurred." I am using Outlook 2007.
This is an Outlook 2007 problem. It sometimes occurs when the Outlook 2007 forms
cache becomes corrupt. To correct it (at least temporarily), follow these steps:
1. In Outlook, choose Tools > Forms > Choose Form. The Choose Form dialog
2. Click the Look In drop-down button and choose Standard Forms Library.
3. Select one of the forms and open it.
4. Close the form. (You don't need to make any changes.)
You may need to restart HotDocs for this to work.
Documents you may be interested
Documents you may be interested