JungleDocs for Office 365 | Configuring Word templates
In this tutorial for JungleDocs 365 you will learn:
- What document templates are
- What a template looks like
- How to configure templates
- How to add templates to JungleDocs rules
What are document templates?
Document templates form the foundation for the documents you create using JungleDocs 365. Document templates consist of both static and dynamic content. This means that the templates contain some content that is always there (such as your logo and address details), and some open spaces that can later be filled with dynamic content, making each document customizable and unique.
- You can merge several smaller documents into one. We call these smaller documents Small Parts.
- You can configure Placeholders / Content Controls to be filled with metadata from your SharePoint lists.
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 JungleDocs 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 is that what changes for each version of a document.
Dynamic content consists of the parts of a document that will get filled in later and can be different for each document. In case of the Quote 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 the dynamic content (in the red boxes) was automatically added to the document template using JungleDocs 365.
How to add dynamic content to a static template?
To let JungleDocs 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 this example, you can simply add the name of the column in the Title and Tag fields of your content control. JungleDocs will then know where to place the metadata.
Note: Read more about content controls and how to use them in the below section.
Tip for JungleDocs 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.
Content control example
You could use a Content Control to let JungleDocs populate a Word Document with selected item metadata.
How to add Content Controls to a template
- Open your Word template (docx) in Microsoft Word.
- If you haven't done so yet, turn on the Developer ribbon in Word.
File -> Options -> Customize Ribbon -> Check “Developer” -> OK.
- 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 (such as First name).
Picture Content Control
Can be filled with a single picture You would use this content control just for the inclusion of pictures.
- Once you have placed the content control. Open the Control Properties.
- 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 populate the document with the Item Metadata from the SharePoint list you select when using a JungleDocs rule.
- Enter the rest of the information/extra content controls for your document.
- Save the template and add it to your JungleDocs rule (scroll down to learn how to do this).
- When finished adding the template to a rule, you could use it, for example, to export the items in the list seen below.
- 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.
Modifying an existing rule
- 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.
- Now select Edit document template. This will prompt the template to open in Word.
Modifying a new rule
To modify a template when creating a rule, you will first start with the rule configuration where you can select Custom template to upload a new template, or select Edit template to edit the existing one.