Creating a Word template

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Document Templates > Create the template >

Creating a Word template

To create a Word template follow the next steps:

 

1. Open Microsoft Office Word and include the body of text. Give the document the required format by changing the font, font size, margins, headers etc, according to your design.

 

DocumentTemplates1

 

The body of your document can include titles, subtitles, tables, texts, images, etc.

 

For example, to create an Invoice template in Word we need the Customer's information and a table to show the Products purchased.

 

DocumentTemplates2

 

2. Reference the information that will  be dynamically obtained from the Bizagi data model.

Remember that the information to be retrieved must be specified as Template Tags for example., [AttributeName]. This will allow obtaining the information from the data model of the Process.

 

For example, the Customer name is referenced with the [CustomerName] Template Tag.

 

DocumentTemplates3

 

To make reference to a collection you must use the following tags:

 

[Foreach:CollectionName]: Indicates the starting point of the Products collection.

 

[AttributeName]: All attributes between the Foreach and the End tag must belong to the collection.

 

[End]: Indicates the end of the Products collection.

 

DocumentTemplates4

 

 

Note in the image above how the Products collection is referenced by using the [Foreach:Products] sentence. All the tags typed from this tag until the [End] tag are assumed to be attributes of this collection. ([Product],[Quantity],[Price])

 

note_pin

The attribute and collection names can be different to the names given in the data model. This is only a reference to be used when mapping the information.

Tags cannot contain spaces.

Every single tag for the columns of all collection MUST be different from each other. No two columns in a document can be called the same way, even if they are in different tables.

When using Foreach and End tags or phrases be sure to capitalize them as specified. Otherwise, it will not be possible to identify the starting or ending point of the collection.

 

3. Save your template.

Once you have entered the desired format and the document body is completed, save the document as a standard Word Document. (.docx).

 

DocumentTemplates5

 

 

note_pin

In a single document you can include the same tag multiple times. You will only have to map it once.

This DOES NOT apply for tags to collections. There can be ONLY ONE tag for each [Foreach]

 

note_pin

It is not possible to use Word templates that contain field codes to generate pdf files.


Last Updated 7/14/2023 11:48:30 AM