document automation

Word templates

Updated: October 13, 2020

Create Microsoft Word templates to auto populate your favorite documents. Build Word templates directly in the App Builder or use our free Word add-in.

App Builder vs. Word add-in

There are two different methods for adding Word templates to your App.

1. App Builder

You can create Word templates directly in the Afterpattern App Builder:

The only downside to the Afterpattern Word template editor is that we offer only a fraction of Microsoft Word's formatting options. If you require these formatting options, we recommend creating a Word template with method 2...

2. Microsoft Word Add-in

You can add a free Afterpattern "add-in" to Microsoft Word. If you are comfortable using Microsoft Word, the add-in is the best way to create powerful and beautiful document templates.

To get the add-in, click Insert then "Get Add-ins":

Learn how to use the add-in

Add variables to your template

There are two methods for adding variables to your Word templates.

1. Insert pre-existing variables

If a particular variable is already defined inside your app (for example, you have a question that defines a variable called client_name), adding it to your template is as simple as clicking "Insert variable" and selecting it from the dropdown.

2. Create & insert new variables

You can create and insert new Text Variables while editing your Word template. This is useful for creating variables that are not defined by a question. For example, you can create a variable that encapsulates an entire clause.

When you create & insert new variables in your template, what you are technically doing is adding a Text Logic Block to your app. Learn more about Text Logic Blocks here (TO DO).

Add conditional logic

After you insert a variable onto your template, you can click on that variable to add conditional logic to it:

Clicking the 'Conditionally insert' toggle gives you access to an Expression Editor (learn more about creating conditional logic).

What is unique about creating conditional logic on Word template variables is that you can define what's known as an "else statement": an alternate definition for the variable to be used if the conditional logic expression is not satisfied.

Typically, you will leave the else statement empty, which amounts to telling your app "insert this variable if the following conditional expression is true, else insert nothing."

Learn more about using conditional logic in this brief video:

Attaching Word templates to Page Blocks

You must attach your Word template to a Page Block in order for it to be assembled. To attach your Word template, select it from the Documents dropdown at the footer of a Page Block:

When you attach a Word template to a Page Block, you can choose to convert the template from a Word document into a PDF.

Contact us for support

Talk to a real person, quickly. We're available 9am - 5pm EST.