Mail Merge to Separate PDFs with Custom File Names
One PDF per row, each named from a column in your sheet — without a VBA macro, an Acrobat licence, or uploading your data to anyone.
You can split a mail merge into one PDF per row, each named from a spreadsheet column, without writing a VBA macro or installing anything: load your Excel file and PDF template into a browser-based merge tool, place the columns on the page, choose which column names the files, and download the result as a ZIP.
The reason this comes up at all is a well-known blind spot in Word's mail merge. It happily produces 300 personalised letters, then hands you all 300 of them as a single document. If what you actually needed was 300 separate PDFs, each named after the person it belongs to, you are on your own.
The usual answers are a VBA macro you found on a forum, a paid Acrobat plugin, or a Word add-in. All three work. All three also mean either trusting a macro you cannot read, paying for a licence, or installing software on a machine where you may not have admin rights.
There is a fourth option that did not exist a few years ago: do the whole thing in the browser, on your own machine, with nothing installed and nothing uploaded.
The five ways to do this
| Approach | Cost | Catch |
|---|---|---|
| VBA macro in Word | Free | You run code you did not write; macros are blocked in many managed environments |
| Acrobat plugin | Paid licence | Needs Acrobat plus install rights on the machine |
| LibreOffice mail merge | Free | Native, offline, and it names files from a database field — but it writes into a Writer document, not onto an existing PDF. A finished PDF design has to be rebuilt first |
| Online merge service | Free tier, then monthly | Your spreadsheet is uploaded to someone else's server |
| In your browser | Free | Generates files but does not email them; large jobs are limited by browser memory |
Which one is right depends on a single question: does the data in your spreadsheet belong to other people? If it is your own test data, use whatever is fastest. If it is payroll, students, patients, or customers, the row about uploading matters more than the row about price.
What you need
- An Excel file where each row is one document, and the columns are the values that change — name, invoice number, date, amount.
- A PDF template: the letter, certificate, or form the values go onto. It does not need to be a fillable PDF.
Step by step
- Load both files. Choose your spreadsheet and your PDF template. If the workbook has several sheets, pick the one holding your data.
- Place your columns. Your column names appear in a sidebar. Drag each one onto the page where its value should print, then set size and colour. Multi-page templates work — place fields on any page.
- Choose what names the files. On the generate step, pick the column that should name each PDF. Choose Invoice No and you get
INV-2043.pdf. Choose Full Name and you getAhmet Yilmaz.pdf. Leave it alone and files are simply numbered. - Download. Every document is generated and packaged into one ZIP.
What happens to awkward file names
Real spreadsheets contain values that are not valid file names, so they are cleaned up rather than rejected. Characters no operating system accepts — / \ : * ? " < > | — are replaced with spaces. Trailing dots and spaces are trimmed, because Windows silently mangles them. Very long values are shortened. A blank cell falls back to a numbered name instead of producing a file called .pdf.
Duplicates are the case people get bitten by: if two rows both say Ahmet Yılmaz, a naive tool writes the second file over the first and you end up with 299 PDFs instead of 300, with no warning. Here the second one becomes Ahmet Yilmaz (2).pdf. Nothing is lost quietly.
Why the browser matters here — fully client-side, never uploaded
Mail merge data is rarely harmless. It is payroll, student records, customer addresses, policy numbers. Uploading that to a document service means a data processing agreement, a cross-border transfer question, and a vendor to audit — for a task you run four times a year.
When the merge happens in your browser, none of that starts. Your files are read by the page, rendered on your machine, and saved back to your disk. This is not a promise you have to take on trust: the page ships a Content-Security-Policy that restricts network connections to its own origin, so it is not able to transmit your spreadsheet anywhere. Open devtools, run a merge, and watch the network tab stay empty.
Where this is not the right tool
It generates files; it does not deliver them. If you need each PDF emailed to its recipient with delivery tracking, you want a service with a mail server behind it. Very large jobs are also worth a thought: everything is held in your browser's memory, so a few hundred rows is comfortable while a few thousand is not. And the interface is currently English only, though the data inside your files can be in any language.
Questions people ask
- Can I mail merge to separate PDFs without VBA?
- Yes. A VBA macro is only one way to split the merge. Any tool that renders each row separately can do it — including a browser-based one that never uploads your data. FormWeaver generates one PDF per row and packages them into a single ZIP.
- How do I name each merged PDF after a field?
- Pick the column you want on the generate step. Each file is then named from that column for its own row — an invoice number, a full name, a student ID. Files with the same name get a numbered suffix so nothing is overwritten.
- Does this work with a PDF that has no form fields?
- Yes. You place fields visually on the page rather than filling existing form fields, so scanned templates and flat PDFs work the same as fillable ones.
- How is this different from LibreOffice’s "Generate file name from database"?
- LibreOffice does the same file-naming trick, free and offline, but only inside a Writer document you build yourself. If your template is already a finished PDF — a certificate design, a letterhead, a form from a printer — LibreOffice cannot write onto it; you would recreate the design in Writer first. This places fields directly on the existing PDF, so nothing gets rebuilt.
- Is my spreadsheet uploaded anywhere?
- No. Everything runs in your browser. The page enforces a Content-Security-Policy whose connect-src is limited to its own origin, so the app cannot send your files anywhere even if it tried. Open your browser devtools and watch the network tab.
Free and open source. No account, no upload, no install.
Open FormWeaver