Configuring Word templates
Applies to JungleDocs for SharePoint 2010-2019.
For a similar tutorial for JungleDocs for Office 365, click here.
In this JungleDocs tutorial, you will learn:
- What document templates are
- How to configure Word document templates
- How to add Word 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.
Adding content controls manually
1. Open your Word template (.docx) in Microsoft Word.
2. Enable the Developer tab in Word: click File> Options > Customize Ribbon. Then, check the Developer box and click OK.
3. Select the Developer tab in the ribbon and click on the content control icon to insert it in the 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.
5. Enter the Tag field value to specify the metadata which will be imported from SharePoint into your actual document. It can a SharePoint column name, a formula or a function. In the example below, the ReportItems function is used to import multiple items from the SharePoint list into the template. To learn more about creating reports with JungleDocs, click here.
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.
Adding content controls from a sample document
A sample document is a quick way to set up your template so that it is automatically populated with SharePoint data. It is a document that contains all the content controls that are available for the related content type or list.
1. In the JungleDocs dashboard, click on the drop-down menu arrow next to the rule containing the template you want to edit, and click Edit From Existing rule (or Edit Base rule for rules in the New tab, or Edit Report rule for rules in the Reports tab).
2. In the Document template section, click Generate sample document.
A sample document is opened. Leave it for now and go to the next step.
3. In the rule settings, click Edit template.
4. Copy the content controls you need from the sample document to the template.
You can also select a content control, grab it by the three-dot icon, then drag and drop into the template.
5. Save template changes.
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 add a new template
1. Open 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 to a 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 new template to this rule.