Create your first template
Upload a Word document with tags and generate your first document from it.
A template is a regular Microsoft Word document (.docx) in which the parts that
change from one document to the next are replaced with tags - placeholders
written in double curly braces, like {{CustomerName}}. When you generate a
document, every tag is replaced with the value you provide.
This guide takes you from a Word document to your first generated document in four steps.
1. Prepare your Word document
Open the document you want to automate in Word and replace each piece of variable content with a tag. Keep the rest of the document as it is - the formatting, images, tables and styles are preserved when documents are generated.
For example, a simple order confirmation may contain:
{{Name}}- the name of the customer{{CompanyName}}- the name of their company{{OrderDate}}- the date the order was placed
A few rules for tag names:
- Tags are surrounded by double curly braces:
{{and}}. - Tag names must start with a letter and can contain letters, numbers and underscores. No spaces or dashes.
- Tag names are case-sensitive:
{{Name}}and{{name}}are two different tags.
Don't have a document handy? Download our order confirmation example and use it to follow along.
2. Upload the template
- Sign in to TemplateDocs and open the Templates page.
- Click Upload Template and choose your .docx file.
- TemplateDocs scans the document for tags. If a tag is malformed (for example, it contains a space), the upload summary points it out so you can fix it in Word and upload again.
Prefer to start from nothing? Click Blank Template to create an empty template and add content in the online editor instead.
3. Review the template
Once uploaded, the template opens in its Overview tab. Here you can see a preview of the document and the list of tags that were detected. If a tag is missing from the list, it is usually because of a typo in the tag name - open the Edit tab to fix it right in the browser (see the Edit a template guide).
4. Generate your first document
The quickest way to try a template is the Quick Document tab:
- Open the Quick Document tab. It shows a form with one field per tag.
- Fill in a value for each tag.
- Choose the output format - Word or PDF.
- Click Generate. The finished document is downloaded to your computer.
That's it - you have generated your first document. Every document you generate from now on uses the same template, so the layout stays consistent while the content changes.
Going further
- Repeat content, like table rows or list items, with loop tags.
- Show or hide parts of the document with conditions.
- Insert images, links, QR codes and charts.
- Browse the example templates for inspiration.