← Back to Dashboard

Word Template Guide

How to create .docx templates for DocuQueue — placeholders, loops, and best practices.


Getting Started

DocuQueue converts your Word documents into fillable PDF templates. You add placeholders in your .docx file, and DocuQueue replaces them with real data when generating PDFs.

1
Create your document in Microsoft Word

Design your layout, add your branding, format it exactly how you want the final PDF to look.

2
Add placeholders

Replace dynamic values with {{ variable_name }} where you want data to appear.

3
Upload to DocuQueue

DocuQueue detects your placeholders and creates form fields automatically.


Quick Start: Download a Template

Don't want to start from scratch? Download a pre-built template, customize it in Word, and upload to DocuQueue.

INV Invoice

Professional invoice with line items table, tax calculation, and payment terms.

Variables: invoice_number, date, company_name, client_name, line_items[], subtotal, tax, total
Download Invoice.docx
CERT Certificate

Award or completion certificate with recipient name, course, and date.

Variables: recipient_name, course_name, completion_date, instructor_name
Download Certificate.docx
CTR Contract

Service agreement with two parties, terms section, and signature blocks.

Variables: party_a_name, party_b_name, terms, start_date, end_date, total_value
Download Contract.docx
LTR Letter

Formal business letter with sender, recipient address, and body content.

Variables: date, recipient_name, recipient_address, letter_body, sender_name, sender_title
Download Letter.docx
How to use Download → Open in Word → Replace {{ variables }} with your data → Save → Upload to DocuQueue → Generate PDF.

Prefer HTML? You can also upload HTML files directly — skip the DOCX step entirely. Create your template in HTML/CSS, upload it, and generate PDFs. Same placeholders work in both formats.

Placeholder Syntax

Use double curly braces with a variable name inside. Spaces become underscores.

Dear {{ client_name }},

Your order {{ order_number }} is ready.
Total: {{ total_amount }}

Thank you,
{{ company_name }}
PlaceholderDetected AsNotes
{{ client_name }}client_nameSimple variable
{{ Company Name }}company_nameSpaces → underscores, lowercase
{{ order_number }}order_numberUnderscores kept
{{ total_amount }}total_amountWorks anywhere in the document
Naming tip Use lowercase_with_underscores for variable names. DocuQueue auto-converts "Company Name" to company_name, but it's cleaner to name them yourself.

Where to Place Placeholders

Placeholders work in all these locations:

What doesn't work Placeholders inside images, SmartArt, charts, or Word art won't be detected. Keep placeholders in regular text.

Conditional Content

Show or hide sections based on data values using Jinja2 syntax.

{% if is_paid %}
  Status: {{ status }} (Paid)
{% else %}
  Status: Pending Payment
{% endif %}

Loops (Tables with Multiple Rows)

To create a table that repeats rows for each item in a list:

1
Create a table with one data row

Add your headers and one row with placeholders.

{% for item in line_items %}
  {{ item.description }}    {{ item.quantity }}    {{ item.unit_price }}
{% endfor %}
Table row loops In Word, put the {% for %} and {% endfor %} tags in the same table row. DocuQueue expands the row for each item in your data.

Complete Example

Here's a full invoice template:

Invoice #{{ invoice_number }}
Date: {{ date }}

From: {{ company_name }}
To: {{ client_name }}

{% for item in line_items %}
  {{ item.description }} — Qty: {{ item.quantity }} × ${{ item.unit_price }} = ${{ item.amount }}
{% endfor %}

Subtotal: ${{ subtotal }}
Tax: ${{ tax_amount }}
Total: ${{ total }}

Do's and Don'ts

DoDon't
Use {{ variable_name }} Use [brackets] or other formats
Keep variable names short and clear Use spaces: {{ Company Name }}
Save as .docx from Word Upload .doc or .pdf files
Test with the Preview tab first Run batch generation without previewing
Use {{ item.field }} in table loops Put loop tags outside the table

Need Help?

If your placeholders aren't being detected:

DocuQueue — Word Template Guide