Generate Word document


This rule generates a Word document from data stored in the process using a Word .docx template. The Word template needs to be pre-created before using this rule and must be attached to a file field, this way the rule will know which template you want to use when creating the document. The Generate Word document rule can also convert the Word document into a PDF right after generating the document.

When to use

Use this rule when your process requires dynamic document generation where the structure of those documents is the same for every instance but the values are different. This rule will use a Word template previously mapped with smart tags. Smart tags are created in Word when a field is selected using the Kianda add-in task pane, and then inserted into the document, see image below for more details:

Smart tag explanation

You can add this rule:

  • to a field
  • to a form
  • to a process (the rule will run on load)

Before you get started

In advance of using the Generate Word document rule, in your process you need to have created at least one or more forms. The rule also requires two file fields, one for storing the Word template and the other for storing the generated Word document or PDF. To learn how to add a file go to File upload control.

  • File field (Template) - used as a container to store the Word template used to generate the Word document.
  • File field (Generated Word Document) - used as a container to store the generated Word document.

A Word template that is used to generate the Word document also needs to be pre-created using the Kianda add-in for Word. You can make each generated Word document very dynamic by using the smart tags that Kianda add-in uses to retrieve information for your form fields and places the values into the word document when generating it. To learn more about how to install and use Kianda add-in, go to Word document add-in.

How to get started

  1. Click on an existing process by going to Administration > Designer and decide which form, or field you will apply the rule to, by clicking on that item so that it is in edit mode so you can see the Edit/pen button, Pen button Pen button.

  2. Click on Add a rule > File management > Generate Word document.

  3. In the Edit rule - Generate Word document dialog box, give the rule a title in the Title field.

    Edit rule - copy file

  4. If you want to add conditions for the rule, click on the Edit conditions button Edit conditions button see Conditions for more details.

  5. Under the Action section fill out the following:

    • Select a document template - select a file field that stores the word template. Your template can pull all values from Input fields in the Controls section of Kianda. For example if a text box field contains “This is a test” text, the value pulled into the generated word document is “This is a test”, see image below:

      word document example

    • Select a document destination - select a file field that will store the generated word document.

    • Convert to PDF - radio button list which indicates whether you want to convert the generated document into a PDF file or not.

  6. When you are finished editing the dialog box, click on OK or click on Close at any time to exit the dialog box.

Editing, deleting or duplicating rules

When you have clicked on an existing rule, and the rule is visible in the right-hand pane under Rules, there are a number of options available to you.

  1. To disable a rule click the slider across beside the rule name.
  2. To copy a rule, click on the Duplicate button Duplicate button beside the rule name.
  3. To delete a rule, click on the Bin/Trash button Bin/Trash button.
  4. To view a rule, click on the rule name to open the Edit rule dialog box.

User tip Target icon

  • When using this rule, create a utility panel and make it invisible to other users. You can then move the Word template file filed and the generated word document file field inside the utility panel. This way other users will not be able to see the unnecessary file fields and will not be able to tamper with them. To see an example of a utility panel, go to Creating a utility panel.
  • You can use the Convert to PDF function of the rule to convert the generated word document into a PDF file instead of using the Convert to PDF rule which is also available in the File management rules.

What’s next Idea icon

To find out more about other File management rules go to File management rules.

To find out more about other rules go to Rules.