Mail Merge to PDF and Email Each One: Macro or No-Code

by Meelika Kivi · Customer Support

Yes, you can mail merge into a PDF, but Word on its own only gives you one PDF that contains every record. It cannot save each record as a separate PDF, and its email merge cannot attach a PDF to each message. To send every recipient their own PDF you need one of three things: a VBA macro (Windows desktop Word with classic Outlook), a paid add-in, or a tool that does the mail merge, the PDF and the email in one step.

This guide shows what Word can do natively, gives you a short macro you can adapt, and explains the no-code route for when you would rather not maintain code.

word

What Word can and cannot do on its own

A Word mail merge (Mailings tab, then Start Mail Merge, Select Recipients and Insert Merge Field) ends with Finish & Merge, which offers three outputs:

  • Edit Individual Documents creates one long Word document with every record after the other, separated by section breaks. Save that as a PDF and you get one big PDF, not one file per person.
  • Print Documents sends all records to a printer. Choosing a PDF printer again gives you one combined file.
  • Send Email Messages turns each merged letter into the body of an email and sends it through Outlook, which has to be your default mail program. The letter is the message itself: Word does not convert it to PDF, and there is no field for attaching a file per recipient.

Two more limits are worth knowing before you plan anything. Word on the web has no mail merge at all, so all of this needs desktop Word. And Word for Mac has the same Mailings tab, but the macro below relies on Windows paths and the Windows Outlook automation interface.

So the gap is always the same two steps: split the result into one PDF per record, and attach each PDF to an email to the right address.

Prepare your Excel data and Word template first

Whichever route you choose, the preparation is the same:

  • One row per recipient in Excel, with headers in the first row and no blank rows in between.
  • An email column (for example Email) with one address per cell.
  • A column for the file name, such as a customer number or last name. Avoid headers with spaces or punctuation; they are easier to reference in a macro.
  • Merge fields in the Word template, inserted with Mailings, Insert Merge Field. Check a few records with Preview Results before you automate anything.

If amounts or dates look wrong in the preview (too many decimals, a date in US order), fix that now with field switches; see how to format mail merge fields in Word.

The macro route: one PDF per record, emailed through Outlook

A VBA macro automates what you would otherwise do by hand. It loops through the recipient list, and for each record it:

  1. limits the mail merge to that single record,
  2. runs the mail merge into a new, temporary document,
  3. saves that document as a PDF with a name taken from the data,
  4. closes the temporary document without saving it,
  5. creates an Outlook message to the address in that record and attaches the PDF.

The code below is for Windows desktop Word with classic Outlook installed. It uses late binding, so you do not need to add an Outlook reference. Change Email and LastName to the column names in your sheet.

' Windows desktop Word only. Save the main document first: the PDFs are
' written to the same folder. Connect the recipient list and clear any filter.
Sub MergeEachRecordToPdfAndEmail()
    Dim mainDoc As Document, outDoc As Document
    Dim olApp As Object, i As Long, lastRecord As Long
    Dim pdfPath As String, emailTo As String

    Set mainDoc = ActiveDocument
    Set olApp = CreateObject("Outlook.Application")

    With mainDoc.MailMerge
        .Destination = wdSendToNewDocument
        .DataSource.ActiveRecord = wdLastRecord
        lastRecord = .DataSource.ActiveRecord

        For i = 1 To lastRecord
            .DataSource.ActiveRecord = i
            .DataSource.FirstRecord = i
            .DataSource.LastRecord = i
            emailTo = .DataSource.DataFields("Email").Value
            pdfPath = mainDoc.Path & "\" & i & "_" & _
                .DataSource.DataFields("LastName").Value & ".pdf"

            .Execute Pause:=False
            Set outDoc = ActiveDocument
            outDoc.ExportAsFixedFormat OutputFileName:=pdfPath, _
                ExportFormat:=wdExportFormatPDF
            outDoc.Close SaveChanges:=wdDoNotSaveChanges

            With olApp.CreateItem(0)
                .To = emailTo
                .Subject = "Your document"
                .Body = "Please find your document attached."
                .Attachments.Add pdfPath
                .Display   ' change to .Send after a successful test
            End With
        Next i
    End With
End Sub

How to run it safely:

  1. Press Alt+F11 in Word, choose Insert, Module, and paste the code.
  2. For a first test, temporarily replace lastRecord in the For line with 3. The macro then creates three PDFs and opens three draft emails without sending anything.
  3. Check the PDFs and the drafts. Only then change .Display to .Send and put lastRecord back.
  4. Save the template as a macro-enabled document (.docm) if you want to keep the macro with it.

Things that commonly go wrong with this approach:

  • Classic Outlook only. The new Outlook for Windows does not support this kind of automation, and Outlook may show a security prompt when a macro sends mail.
  • File names. A value with a slash, colon or question mark in the name column makes the PDF export fail. Use an ID or a cleaned-up column for file names.
  • Filters and excluded rows. The simple loop walks through records by number. Remove filters and unchecked recipients first, or remove those rows from the sheet.
  • No log. If something fails halfway, you have to work out which emails already went out. Larger runs need error handling and a log file.

For a gentler introduction to the VBA editor and macros in a mail merge, see How to Combine Mail Merge with Word Macros.

Add-ins and other tools

If you would rather not touch code, several paid add-ins extend Word or Outlook with a "one PDF per record, attached to each email" option. They differ in price, licensing and how they send, so check the vendor's current documentation:

  • Outlook mail merge add-ins such as MAPILab's Mail Merge Toolkit add attachment options to Word's Send Email Messages step.
  • Adobe Acrobat on Windows adds an Acrobat tab to Word, whose Mail Merge option converts a Word mail merge into PDF files. It needs a paid Acrobat licence and desktop Word.
  • AutoMailMerge, an Acrobat plug-in from EverMap, works the other way round: it fills a PDF form rather than a Word document.
  • Power Automate can fill a Word template, convert it to PDF and send it with Outlook, row by row. The Word connector is a premium connector and works with content controls, not mail merge fields, so you usually rebuild the template.

If your template is already a PDF form rather than a Word document, the question changes from "mail merge to PDF" to "fill a PDF from Excel"; see auto-fill PDF forms.

The no-code route: Word template in, one PDF per recipient out

MailMergic does the mail merge, the PDF conversion and the sending in one place, in the browser. Nothing is installed: no Word add-in, no Outlook, no macro security settings.

  1. Upload your Word template (.docx). Your layout, fonts and letterhead stay as they are.
  2. Add your recipient list from Excel (.xlsx or .xls), CSV or Google Sheets. One column holds the email address.
  3. Place your merge fields and preview a few rows.
  4. Generate one PDF (or Word file) per row, named from your data, for example Invoice_{Number}.pdf. Download them as a ZIP if you only need the files.
  5. Write the email. Subject and body take merge fields too, and each recipient's own document is attached to their message. You can send from your own verified domain, or from your address without any setup.
  6. Track the result. Delivery, bounces and opens are recorded per row, so a bad address shows up instead of disappearing silently.

You can also attach a fixed file that everyone gets (terms and conditions, a venue map) next to the personal one, and protect each PDF with a password taken from a column. The details are on the mail merge with attachments page.

The free plan lets you generate 100 documents a month (with a watermark), no credit card needed, so you can check the output from your own template before you send anything. Sending documents by email is part of the paid plans.

Upload your Word template and create one PDF per recipient

Which route to choose

  • Macro: free and fully under your control, if you work on Windows with classic Outlook and are comfortable testing and maintaining VBA.
  • Add-in: no code, but tied to desktop Word or Acrobat on one machine and a per-user licence.
  • Browser tool: no code and nothing installed, works on any computer, and adds per-recipient tracking. Your data is uploaded to the service to do the mail merge.

Whichever you pick, test with three or four of your own addresses first. A mistake in a mail merge goes out to everyone at once, and a test run costs a minute.