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

  1. Open Microsoft Word (or LibreOffice Writer).
  2. Design your document: layout, fonts, logo, tables, etc.
  3. Place {{variable_name}} wherever a recipient-specific value should appear.
  4. Save as .docx format (not .doc).
  5. 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:

SyntaxEffectExample output
{{name|upper}}UPPERCASEADAEZE OKONKWO
{{name|lower}}lowercaseadaeze okonkwo
{{name|title}}Title CaseAdaeze Okonkwo
{{amount|default:0}}Fallback if empty0

PDF Templates

Creating a PDF Template

  1. Open your PDF in Adobe Acrobat, LibreOffice, or any PDF editor that supports form fields.
  2. Add text form fields at each position where a variable should appear.
  3. Name each field exactly the same as the normalized column name in your spreadsheet (e.g. full_name, course_title).
  4. Save as a standard PDF (.pdf).
  5. 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, or 1; 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 .docm files are not accepted.
  • PDF templates: PDF version 1.4 through 1.7 supported. PDF/A and encrypted PDFs are not supported.