PLAY "MACRO"

PlaceholderA marker in an instruction or expression model that indicates where a value must be substituted. This value must be a literal value or a variable. Instruction and expression models help the developer use the correct syntax in a script. Replace With
"MACRO" A word processor macro that performs a certain functionIn programming, a function is a piece of code that operates on one or more inputs, and produces an output. in your templateA word processor or form document that has been converted to HotDocs format so that it can be automated. When in template format, changeable text in the template can be replaced with variables. Other instructions can be added as well, such as instructions that create lists, condition text, and insert other templates.

The PLAY "MACRO" instructionA command in a script or template that performs a special task, such as inserting a template or asking a dialog at a specific place in the interview. plays a word processor macro after the documentThe file that is created after a template has been assembled. is assembled and either sent to the word processor, printed, or saved.

Where you store the macro depends on which word processor you are using:

  • For WordPerfect users, the macro can be stored anywhere. The PLAY instruction must include the file name of the macro, and if the macro is stored anywhere other than the default macro folder, the instruction must include a full path to the file as well.
  • For Word DOTFile name extension that designates that the file is a Microsoft Word DOT template. (See text document.) users, the macro must be stored in the template itself, in Normal.dot, or in any global template that is automatically loaded when you start Word.
  • For Word RTFFile name extension that designates that the template file is a Word RTF file. (See text template.) or DOCX users, the macro must be stored either in Normal.dot, in any global template that is automatically loaded when you start Word, or in a Word template you associate with the template through ComponentA template resource file that displays or stores information about the user input/answers to merge in the final document. Examples of components include variables, dialogs, dialog elements, merge text groups, and formats. Manager. (See Specify a Word Template for Storing Post-Assembly Macros for details.)

Macros can be helpful in many situations, such as making sure the format of an inserted clausePredefined sections of text that can be selected and added to an assembled document. Usually clauses are grouped together in a clause library so users can choose which ones they want to insert, although some clauses are merged in the document automatically. matches the rest of the document. For example, the text in the Authority Clause document may be formatted differently than the text in the main document. You could create a macro that can adjust the formatting so that it’s uniform:

«INSERT "Authority Clause.docx"»

«PLAY "Standard_Format"»

To insert a PLAY instruction in a template

  1. At the template, position the cursor in the template where you want the PLAY instruction.
  2. If you are using Microsoft Word:
    • Click the HotDocs menu in the HotDocs toolbar and choose Other FieldA place in the template that denotes where users' answers should be merged, or where a specific instruction should be executed. In a text template, a field is denoted by chevrons. In a form template, a field is denoted by a colored box that is overlaid on the form's static text. from the listTwo or more answers to one question merged in the document. of options. The Other Field dialogIn template development, represents the component in which the developer groups variables and other components. In document assembly, represents the group of questions in the Interview tab of the assembly window where users enter their answers. box appears.
    • Click the Field type drop-down button and choose PLAY.
    • In the Macro name field, enter the name of the macro you want to run.
    • Click OK. The instruction is inserted in the template.
  3. If you are using WordPerfect:
    • Copy an existing variableA component that is used to represent changeable text (such as names, dates, numbers, etc.) in the template. Types of variables include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information. or instruction field in the template.
    • Replace text between the chevronsThe double-angle brackets (« ») that surround a variable in a text template. Together, the chevrons and variable name make up the variable field, for example, «Client Name». (« ») with the PLAY instruction.

See Specify a Word Template for Storing Post-Assembly Macros for more information.

PLAY instructions are executed when you create an actual document from the assembly. This includes sending the document to the word processor, saving the document, or printing a copy of the document. If there are multiple instructions, they are processed in the orderThe process of designating the sequence in which form template fields are asked in the tab order. Establishing this order in a form is important for users who directly fill the form document. they are encountered.