gg
Home › Blog › Mail merge by hand: one template, many finished letters

Mail merge by hand: one template, many finished letters

2026-09-30 · 2 min read
businessrecordswork

Sending the same letter to fifty people with fifty different names, dates or amounts doesn't require fifty separate documents written by hand. It requires one template with placeholders, one table of data, and a rule for repeating the substitution once per row. That's the whole idea behind mail merge, whether it's done in a word processor, a script, or on paper.

The method

Write the letter once, with a placeholder standing in for each value that changes per recipient — commonly written as {{field}}. Build a table where the first row names the fields and each row after that is one recipient's data. Then, for every row:

  1. Take a fresh copy of the template.
  2. Replace every {{field}} with that row's value for the matching column.
  3. If a row has no value for a field the template uses, don't leave it blank — a blank is silent and looks finished when it isn't. Mark it visibly, so a missing name or amount can't go out unnoticed.

One row, one finished document, repeated. Conditional blocks (only include this paragraph if a field is set) and repeated sub-blocks (list every item in a field inside one letter) are extensions of the same substitution rule, not a different idea.

A worked example

Template: Dear {{name}}, your balance of {{amount}} is due on {{due_date}}.

Data table:

nameamountdue_date
J. Rivera$140.00Oct 15
A. Chen$85.50Oct 15
M. Osei(missing)Oct 15

Row 1 produces: "Dear J. Rivera, your balance of $140.00 is due on Oct 15." Row 2 produces the same sentence with Chen's values substituted. Row 3 is missing a value for {{amount}} — the correct output is not a letter with a blank space where the balance should be, but a letter that visibly flags [NEEDS YOU: amount], so whoever reviews the batch catches it before anything is sent, rather than mailing someone a bill with no number on it.

What this doesn't include

This covers plain text and Markdown substitution — it doesn't produce a formatted .docx or PDF directly; the finished text still needs pasting into a word processor or PDF tool for layout and printing. It also doesn't validate that a value is the right type for its field (a date-shaped string in an amount field merges exactly as typed), so a quick read of the first few finished documents in a batch is still worth doing before sending fifty of them.

Run your own batch

The free Document Mail Merge tool runs this substitution — placeholders, conditionals, missing-value flags and all — entirely on your device, with nothing uploaded.

Try it free — with the steps shown

The Document Mail Merge runs in your browser and shows exactly how it got the answer, so the method sticks.

Open Document Mail Merge

More from the blog