Configuring Word templates
In this JungleDocs tutorial, you will learn:
- What document templates are
- How to configure Word document templates
- How to add Word document templates to JungleDocs rules
Understanding document templates
Document templates form the foundation for the documents you create using JungleDocs. Document templates are only partly filled with content, with some spaces left blank. You can use JungleDocs to automatically fill the blank spaces in your templates with data from your SharePoint and other documents.
Things to know about document templates:
- They are assigned to JungleDocs rules
- They form the foundation for the documents you create using JungleDocs
- They can be either Word, Excel or PowerPoint files
- They can contain a lot or very little information
- They contain both static and dynamic content
- Dynamic content is governed by content controls
What does a Word template look like?
JungleDocs Word template contains both static content and dynamic content. Static content is content that is always there and does not change. In contrast, dynamic content changes for each version of a document.
Understanding dynamic content
Dynamic content is content that is automatically filled by JungleDocs when creating a document and it can be different for each document. A good example of dynamic content is customer contacts, quote number, sales manager name etc.
In the image below, the dynamic content (in the red boxes) was automatically added to the document template using JungleDocs.
Adding dynamic content to a template
To let JungleDocs add dynamic content into a static document template you will need to add Word content controls to it. Content controls are placeholders, i.e., they hold the place in a template empty and later fill it with data when creating an actual document. For example, [First name] will be replaced by the name of the person you have selected in your SharePoint list.
To configure a content control properly, you need to enter a SharePoint column or list name in content control properties. This will tell JungleDocs which SharePoint list to use to import data into a placeholder. In addition to column or list names, you can use formulas for advanced configuration. In the image below, you can see where content controls are placed in the document.
In the example below, the SharePoint column name was added in the Title and Tag fields of the content control. This way, JungleDocs knows where to place the metadata.
Read more about content controls and how to use them in the section below.
Adding content controls to Word templates
There are two ways to insert and configure content controls in Word document templates.
Method #1: enter content control properties manually
1. Open your Word template (.docx) by in Microsoft Word.
2. Enable the Developer tab in Word: click File > Options > Customize Ribbon. Then, check the Developer box and click OK.
3. Insert a content control into your document template. There are three types of content controls to choose from.
- Rich text content control can contain custom formatted text or other items, such as tables, pictures, or other content controls. You would use this content control if you want to include a table, pictures, or other content controls. The data can also be formatted specifically inside this content control. You would use this, for example, if this content control contains a date and you want the year to be a different font than the month.
- Plain text content control can only contain plain text. You can't select specific formatting for this content control; it copies the formatting used around it. This is the content control you will use most often for plain text and simple placeholders (e.g., first name).
- Picture content control can be filled with a single picture. You would use this content control only to include images.
4. Once you have placed the content control in the template, open its properties.
We recommend to copy and paste the Tag field value into the Title field. This way, you will be able to see content control properties without opening them.
6. Save the template and add it to your JungleDocs rule (scroll down to learn how to do this). Now, when you select items in SharePoint and click on the rule, JungleDocs will automatically use the template and insert metadata into your document.
Method #2: copy content controls from a sample document
To help you configure your templates more easily you can use the Generate sample document option. This feature allows you to drag and drop pre-made content controls into your template.
1. Open JungleDocs from the list that you want to import metadata from.
2. Open JungleDocs rule settings, scroll down to Document template and click Generate sample document.
This command will create a document with all the available content controls that you can use in your template. Depending on your SharePoint list configuration, it might look something like this:
3. Now, you select the placeholder that you need and simply drag and drop or copy and paste straight into your template.
Adding templates to JungleDocs rules
You can either modify an existing template which is already assigned to a JungleDocs rule or create a new template and edit it as an intermediate step while creating a new rule.
To modify an existing template
1. Navigate to the SharePoint source list or library that you will use to create your documents and reports and launch JungleDocs.
2. Select the rule you want to edit the template for. Click on the drop-down menu arrow and click Edit template. This will prompt the template to open in Word.
3. Modify the template and save it.
To create a new template
1. Start from a blank Word document, add a repeated section (or several - it's up to you), apply some formatting etc., and save this document.
2. Add the template an existing rule: in the rule settings window, select Custom template, then click Manage custom template and select the upload option. Note that is not necessary to upload a "final version" of the template: you will always be able to modify it later.
3. Alternatively, you can create a new JungleDocs rule and add the newly created template to this rule.