Document Templates
MergeMail supports two kinds of document templates: DOCX (Microsoft Word) and PDF (form-field-based). Both produce a personalized per-recipient document that is automatically attached to the outgoing email.
DOCX Templates
Creating a DOCX Template
- Open Microsoft Word (or LibreOffice Writer).
- Design your document: layout, fonts, logo, tables, etc.
- Place
{{variable_name}}wherever a recipient-specific value should appear. - Save as
.docxformat (not.doc). - Upload to MergeMail at Templates → New Template.
Placeholder Syntax
Placeholders use double curly braces: {{variable_name}}.
The variable name must match the normalized column name from your spreadsheet.
Dear {{full_name}},
Congratulations on completing {{course_title}} on {{completion_date}}.
Your certificate ID is {{certificate_id}}.
This certificate is issued by the {{institution_name}} Training Department. Where Placeholders Work
- Main body text (paragraphs, headings, lists)
- Table cells
- Headers and footers
- Text boxes
- Inline fields (e.g. date fields)
Placeholders inside images are not supported. For image substitution, use separate templates per recipient.
Formatters
Apply inline formatters to control how values appear:
| Syntax | Effect | Example output |
|---|---|---|
| {{name|upper}} | UPPERCASE | ADAEZE OKONKWO |
| {{name|lower}} | lowercase | adaeze okonkwo |
| {{name|title}} | Title Case | Adaeze Okonkwo |
| {{amount|default:0}} | Fallback if empty | 0 |
PDF Templates
Creating a PDF Template
- Open your PDF in Adobe Acrobat, LibreOffice, or any PDF editor that supports form fields.
- Add text form fields at each position where a variable should appear.
- Name each field exactly the same as the normalized column name in your spreadsheet (e.g.
full_name,course_title). - Save as a standard PDF (
.pdf). - Upload to MergeMail at Templates → New Template.
Supported PDF Field Types
- Text fields — Filled with the string value from the spreadsheet.
- Checkbox fields — Checked if the spreadsheet value is
true,yes, or1; unchecked otherwise.
After all fields are filled, the PDF is "flattened" (form fields converted to static text) so recipients cannot edit values.
Template Preview
After uploading a template, the Template Detail page shows all detected placeholders (for DOCX) or form fields (for PDF). Click Preview to generate a sample document using the first row of any of your datasets.
Template Limits
- Maximum template file size: 50 MB.
- DOCX templates: standard OOXML format only. Macro-enabled
.docmfiles are not accepted. - PDF templates: PDF version 1.4 through 1.7 supported. PDF/A and encrypted PDFs are not supported.