Configuring Word templates
Applies to JungleDocs for Office 365.
For a similar tutorial for JungleDocs for SharePoint 2010-2019, click here.
In this tutorial for JungleDocs for Office 365 you will learn how to configure document templates and how to add them to JungleDocs for Office 365 rules.
About document templates
Document templates form the foundation for the documents you create using JungleDocs for Office 365. Usually, document templates have some static (fixed) content. They can also have placeholders that are filled with content depending on the context of document creation (e.g., quote number). In Microsoft Office, the placeholders are added by using content controls. There are two main benefits of using content controls in document templates:
- You can configure content controls to retrieve metadata from your SharePoint lists into your document.
- You can also use content controls to retrieve entire documents (each of them could have their own content controls) and merge them into a final document by clicking checkboxes. To learn more, see Small Parts.
Things to know about document templates:
- They are assigned to rules
- They form the foundation for the documents you create using JungleDocs 365
- They can be either Word, Excel or PowerPoint files
- They contain both static and dynamic content
- They contain content controls
What does a template look like?
JungleDocs needs to know where exactly to place the data from your SharePoint in your document template. To let JungleDocs fill documents correctly, you will add content controls (placeholders) to the template. Document templates consist of both static content and dynamic content. Static content is content that is always there and does not change. Dynamic content changes for each version of a document.
Dynamic content refers to the parts of a document that will be filled in later and can be different for each document. In the example below, this could be the product the client is interested in, the client's details, price, quote number, salesperson, description etc. In the image below, dynamic content (in the red boxes) was automatically added to the document template using JungleDocs for Office 365.
How to add dynamic content to a static template?
To let JungleDocs for Office 365 add dynamic content into a static document template you will need to add content controls to it. You will enter a formula or column/list name in each content control, this will tell JungleDocs from which SharePoint list to gather the data. In the below image you can see where content controls are placed in the document.
In the example below, we're using Company column in content control properties to tell JungleDocs for Office 365 where to look for metadata and where to place it in the template.
For beginners: add dynamic content by dragging and dropping content controls
To help you with configuring 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. To do this, simply open JungleDocs from the list that you will be using the metadata of. Next, open the JungleDocs rule settings and scroll down to Type & Template. Now click the Generate sample document button. This command will create a document with content controls that you can drag into your template.
When you have the sample document, you can simply drag the content controls that were generated into your template.
How to configure a document template?
JungleDocs needs to know where exactly to place the data from your SharePoint in your document template. To let JungleDocs fill documents correctly, you will add content controls (placeholders) to the template. You can use content controls to let JungleDocs populate a Word Document with selected item metadata.
Adding content controls to a template
1. Open your Word template (.docx) in Microsoft Word.
2. If you haven't done so yet, turn on the Developer ribbon in Word. Click File > Options > Customize Ribbon > Check Developer > OK.
3. Insert a content control into your document template. There are three types of content controls to choose from. These can be found in the Developer tab.
- 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. This 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 texts and simple placeholders (e.g.,
- Picture content control can be filled with a single picture You would use this content control just for the inclusion of pictures.
4. Once you have placed the content control, click Properties.
5. Enter the Tag field value. The tag field is used to specify a formula for JungleDocs (field name, lookup field name, formula or function). For example, you could enter ReportItems (you would use a table for this), to let JungleDocs for Office 365 populate the document with the item metadata from the SharePoint list you select when using a rule.
6. Enter the rest of the information/extra content controls for your document.
7. Save the template and add it to your JungleDocs rule (scroll down to learn how to do this).
8. When finished adding the template to a rule, you could use it, for example, to export the items in the list seen below.
9. When you run the rule, your Word document would look like this:
How to add templates to JungleDocs rules?
You can either update a new template to you a rule or edit the template that is already assigned to it.
Modify an existing rule
1. To modify existing document templates, navigate to the source list/library that you will use to create your documents and reports and launch JungleDocs 365. Now select the rule you want to edit the template for. Click on the drop-down menu arrow and click Edit rule.
2. Now select Edit document template. This will prompt the template to open in Word.
Modify a new rule
1. Open JungleDocs for Office 365 and click Add new to add a new rule
2. In the Type & Template section:
- select Edit document template if the rule already has a default template that you want to edit,
- to add a custom template, select Custom template, then select Pick up a template from SharePoint or Upload a template from disk