Table of Contents
Microsoft Word Integration Overview
Connect Your App from the Checkbox Word Add-In
Insert Tags using Word Integration
Switch Apps in Word Integration
Validate Tags in Word Integration
Word Integration Validator Error List
Microsoft Word Integration Overview
Through the Microsoft Word Integration, users can now connect their Checkbox Apps to Microsoft Word to insert and validate tags with the correct syntax inside rich style document templates. This minimises any syntax errors inside rich style documents before uploading to Doc Gen blocks. Microsoft Word Online and Word Desktop apps are supported.
To use the Checkbox Word Add-In, you must first add the Checkbox Word Add-In to your Word Online or Word Desktop app from the Microsoft AppSource here.
Note: To utilise the Word Integration, the Word document must be in .docx format
See articles below to set up and use the Checkbox Word Add-In:
- Connect Your App from the Checkbox Word Add-In
- Insert Tags in the Checkbox Word Add-In
- Validate Tags in the Checkbox Word Add-In
- Switch Apps in the Checkbox Word Add-In
- Checkbox Word Add-In Validator Error List
Connect Your App from the Checkbox Word Add-In
To connect your App to your Checkbox Word Add-In you must first retrieve the Unique App Code that will retrieve and load all variables from your App into your Microsoft Word.
Notes:
- To utilise the Checkbox Word Add-in, the Word document must be in .docx format
- The following steps will assume that you have already added the Checkbox Word Add-In in your Word app. Get the Checkbox Word Add-In here.
How to connect your App to the Checkbox Word Add-In
- In Studio, click onto a “Doc Gen” block.
- On the right panel, check the ‘Use docx template’ checkbox and copy the “Unique App Code” to your clipboard
- If you are using the Checkbox Word Add-In for the first time, click the “Enter Unique App Code” button and paste the Unique App Code into the Checkbox Word Add-In on Word and click “Connect”.
If you are a returning user of the Checkbox Word Add-In, go to the “Settings” tab to paste the Unique App Code OR Switch App to paste a new Unique App Code for another App. - Select the report file name you are referring to using the drop-down menu
- Once the App is connected, go to the “Insert Tags” tab and you will notice that all variables from your app have been retrieved in the first drop-down menu.
-
You will also notice that you can insert Rule Tags from the second drop-down menu
Insert tags using Word Integration
What tags can you insert into your Word document using the Checkbox Word Add-In?
The two types of tags that can be inserted in your document include Variable Tags and Rule Tags. Variable Tags simply refer to a reference variable enclosed in curly brackets (e.g. {{TXT2}}). Rule Tags refer to the syntax for conditional variable references, loops and e-signature meta tags.
Learn more about the syntax of tags that can be implemented in the Rich Style Document Template article
How to insert Variable Tags
- Go to the “Insert Tags” tab in your Checkbox Word Add-In on Word
- Select a section in your document where you want to insert a Variable Tag
- Using the first drop-down menu, select the variable you want to insert and click onto the green “Insert Variable Tag” button to insert the variable with the correct syntax
How to insert Rule Tags
- Go to the “Insert Tags” tab in your Checkbox Word Add-In on Word
- Select the section in your document where you want to insert a Rule Tag
-
a) Using the second drop-down menu, select the rule you want to insert and click onto the green “Insert Rule Tag” button to insert the rule with the correct syntax (e.g. Condition Rule Tag)
OR
b) Highlight the text you would like to enclose and wrap in the Condition Rule Tag and click onto the green “Insert Rule Tag” button to insert the rule with the correct syntax
Result:
Note: You will notice that the opening and closing curly brackets are highlighted in green. This helps you clearly recognise the opening and closing of the Condition Rule Tag as well as the content in between, especially when using nested Rule Tags.
-
For the Condition Rule Tag, replace the italicised placeholder condition and content (i.e. {{# insert condition}} insert content if condition is true {{/}}) with the appropriate condition rule and the content (e.g. {{#AUS=="YES"}}{{CompanyFull}}{{/}}).
Note: To add loops, repeat steps 1-4 by replacing Condition Rule Tags with Loop Rule Tags. Learn more about conditional and loop syntaxes that can be implemented in Rich Style Document Templates.
Inserting DocuSign Rule Tags
- Go to the “Insert Tags” tab in your Checkbox Word Add-In on Word
- Select the section in your document where you want to insert a DocuSign Rule Tag (e.g. signature, date of signature etc)
-
Using the second drop-down menu, select the DocuSign tag you want to insert and click onto the green “Insert Rule Tag” button to insert the rule with the correct syntax
-
Replace the ‘#’ key with the number of the corresponding signatory in the assessment (e.g. from [[signature#_doc1]] to[[signature1_doc1]]).
Note:You must style DocuSign rule tags with different font style than rest of text in the same line (e.g. bold, italics etc).
Limitations
-
We currently do not support Image Tags and therefore must be manually included in the document. Learn how you can upload images into document templates.
-
Switch Apps in Word Integration
Why would you switch Apps connected to the Checkbox Word Add-In?
Switching your Apps is a necessary function on the Checkbox Word Add-In to retrieve the relevant variables to insert and validate for the relevant document. You may have connected a specific App to insert and validate tags in the relevant Word document but later work on a separate App with a different document.
How to switch Apps
- Go to the “Settings” tab for the Checkbox Word Add-In
- On the right hand panel, click “Switch App
- Insert the new Unique App Code of a different App. Read Connect Your App to the Checkbox Word Add-In for more details
Validate Tags in Word Integration
Why would you validate your tags in your Word document?
Despite being able to insert tags with the correct syntax, there is always a risk of having syntax errors. By using the ‘Validate Tag’ function, you can now scan and pinpoint syntax errors in the document. The validator describes the error to help fix the syntax errors and minimise the room for error in the document template before uploading to the Doc Gen block.
See the full list of errors you can get in the validator of the Checkbox Word Add-In.
How to validate tags
- Go to the “Validate Tag” tab in your Checkbox Word Add-In on Word
- On the right panel, click on the green “Validate” button to scan for syntax errors in the document
-
Read and click onto the syntax error(s) that appear in the validator box to pinpoint the issue on the document
- If you click into a Condition Rule Tag syntax error, the validator will also give you the option to replace the condition variable
- If the condition variable needs replacement, select the new variable from the drop-down menu
- Click “Replace” to replace the variables
Limitations
- Only tags enclosed in double curly brackets ‘{{}}’ and the corresponding placeholder conditions and contents are validated
- Metavariables in double curly brackets '{{}}' will not be validated in the validator
- DocuSign tags with double square brackets ‘[[]]’ will not be validated in the validator
-
Invalid variables detected in the footer cannot be replaced using the "REPLACE" functionality
Word Integration Validator Error List
The following is the list of errors you may experience in the validator when using the Checkbox Word Add-In.
Note: Error detection for e-signature tags is not yet supported in the validator of the Checkbox Word Add-In.
Error | Relevant Tags | Example Message | Meaning |
---|---|---|---|
Unclosed tag |
Variable tags, Rule tags |
Unclosed tag: The tag beginning with "{{example}" is unclosed | The variable or rule tag is missing a curly bracket(s) on the end to close the tag |
Unclosed loop (condition) | Condition Rule tags |
Unclosed loop: The loop with tag "AUS=="Yes" is unclosed |
The closing curly brackets in the condition rule tag is missing a “/” i.e. {{}} instead of {{/}} |
Syntax Error (Condition placeholder) | Condition Rule tag |
Syntax Error: Token 'condition' is an unexpected token at column 9 of the expression [ insert condition ] starting at [condition ] | The condition placeholder has not been replaced by a condition |
Lexer Error (missing quotation mark) | Condition Rule tag |
Lexer Error: Unterminated quote at columns 6-10 ["Yes] in expression [ AUS=="Yes] | A quotation mark is missing in the specified condition |
Lexer Error (quotation mark type) | Condition Rule tag |
Lexer Error: Unexpected next character at columns 6-6 [“] in expression [ AUS==“Yes”] | smart quotation marks and need to be converted to straight quotation marks. See article here to convert. Despite the validator classifying this as an error, the document will still work as intended when uploaded to a Doc Gen block |
Unmatched variables in loop condition | Loop Rule tag |
Closing tag does not match opening tag: The tag "LIST12" is closed by the tag "LIST11" | The LIST variables in the loop condition are incongruent |
Unopened loop | Loop or Condition Rule tag |
Unopened loop: The loop with tag "LIST11" is unopened OR Unopened loop: The loop with tag "" is unopened |
There is a syntax error at the beginning of the loop condition OR The condition tag is missing, ensure there is no missing hashtag (#) |
Unclosed loop | Loop Rule tag |
Unclosed loop: The loop with tag "LIST12" is unclosed | There is a syntax error at the end of the loop condition |
Invalid variable tag | Variable tags, Rule tags |
{{PARA12}} is invalid variable name | The variable tag identified from the document does not exist in the connected App |
Unopened tag |
Variable tags, |
Unopened tag: The tag beginning with "PARA11" is unopened | The variable or rule tag is missing a curly bracket(s) at the beginning to enclose the tag |