ScrubDrop

ScrubDrop › Guides

Word mail merge: the data source path, merge fields and other recipients' letters a file can still carry

Last updated: 27 October 2026

Short answer: a mail merge involves three files, and only one of them is meant for the recipient. The main document keeps its connection to the recipient list: where the list is, often a path that names your user folder or a file share, and how Word reads it. Its merge fields name the list's columns. A file made with Edit Individual Documents holds a letter for every record that was merged. Send each person a letter merged for them alone, or a PDF of it, not the main document and not the file of all the letters.

This page is for anyone who sends letters, certificates, invoices or notices made with Word's mail merge, and then needs to send one of them on as a file: to a person who asks for a copy, to a colleague, or as an attachment. It covers Word for Windows and Mac. The examples are typical cases, not reports of real ones. A mail merge for job offers is also covered, in a few lines, in the HR and recruiting check.

Three files, one recipient

Microsoft's page Use mail merge for bulk email, letters, labels, and envelopes describes the parts: "A data source, like a list, spreadsheet, or database, is associated with the document. Placeholders--called merge fields--tell Word where in the document to include information from the data source." In practice that gives three files:

The files of a mail merge, and what each can hold
FileWhat it isWhat it can hold besides the letter
The data sourceThe list: an Excel sheet, an Outlook contact list, an Access or other database, a text file, or a list typed in WordEvery recipient, with every column, including the ones the letter does not use
The main documentThe letter with merge fields in itWhere the data source is and how Word reads it; the names of the columns; the text of every branch of a rule; the usual properties
The merged resultThe letters, from Finish & MergeAs many letters as records were merged; tracked deletions, if you deleted letters with Track Changes on

The data source should never travel with the letter; the other two are the ones that get sent by mistake.

What the main document keeps

Saving a merge letter saves its link to the list. Microsoft's page Create and print a batch of personalized letters says: "When you save the mail merge document, it stays connected to your mailing list for future use." Its page on email merge, Create and send email messages, puts it the same way: "When you save the main document, you also save its connection to the data source."

Word for Windows usually shows that connection when the main document is opened. Microsoft's page You receive the "Opening this will run the following SQL command" message (written for Word 2010 and 2013, and saying the prompt "exists in all later versions") quotes it: "Opening this document will run the following SQL command", followed by the query and "Data from your database will be placed in the document." If the person you send the main document to sees that message, they have the main document, not a letter.

Inside the file, the connection is in the document settings (the mail merge settings of the Office Open XML standard, ECMA-376 Part 1, §17.14). In a .docx, word/settings.xml holds a <w:mailMerge> element with the connection string (w:connectString), which for an Excel list can include the workbook's full path, and the query that reads it (w:query, such as SELECT * FROM `Sheet1$`); word/_rels/settings.xml.rels holds the data source's address. Microsoft's page Data sources you can use for a mail merge says to "be sure to save it on your local computer or a file share", so a list's path usually names one or the other. A list kept in a user folder gives a path such as C:\Users\a.example\Documents\Staff list 2026.xlsx: the user name, the folder layout and the name of the list, in one line. Whether the reader can open that path depends on where the list is; what the path says, they can read either way.

The recipients' rows are in the data source; the main document holds where the list is and how Word reads it. The mail merge settings can also point to a recipient data part (recipientData in the same section of ECMA-376), which records which records are included; look for it as word/recipientData.xml, or through settings.xml.rels. Look at what the merge fields show in a saved main document, too, before you treat it as free of anyone's details.

What the merge fields say

Microsoft's page Insert mail merge fields says: "Merge fields come from the column headings in the data source." A field named Salary_band, Debt_outstanding or Disciplinary_note tells the reader what the list holds about people, even with no values in it. Rules work the same way: the same page gives the example of a rule that adds "Past due" when a recipient's due date has passed. In a main document, a rule (an IF field) keeps the text for every case in its field code, so a letter that shows one sentence can carry the sentence written for the other recipients too.

Microsoft's page Insert, edit, and view fields in Word says: "Because field codes can be visible to anyone reading your document, be sure that the information you place in field codes is not information that you want kept private." Press Alt+F9 on Windows, or Option+F9 on a Mac, to switch between all field codes and their results (Microsoft's keyboard shortcuts in Word), and read the codes before a file with fields leaves you.

The merged file: one letter, or all of them

Finish & Merge gives three choices on the letters page: "Choose Edit Individual Documents, Print Documents, or Send Email Messages." Edit Individual Documents is there "to review and update each letter individually before printing". The overview page says the merge document "will generate a personalized version of itself for each name in the data source": merged for every record, the result holds every recipient's letter. Saving it and attaching it when one person asks for a copy sends them every recipient's letter. Deleting the other letters from that file is easy to get wrong: with Track Changes on, the deleted letters stay in the file as tracked deletions (see accept or reject tracked changes), and a long merge is hard to check page by page.

A letter merged for that one person avoids both. Microsoft's page Mail merge: Edit recipients shows the recipient list with every line selected: "Clear any names that you don't want to send to." With only one name left, Edit Individual Documents makes a document with only their letter. For email, the email merge page offers "Current record only" and a range (From and To) under Send records; it also says "Word sends an individual message to each email address".

Turning the letter into a plain document

Check whether the letter you are about to send is still a mail merge document, or still has fields in it: a main document saved under a new name is, and so is a letter you finished by hand in the main document. Before it goes out as a .docx:

Then the usual places apply: the author and company in the properties (see Word's company, template and custom properties), comments, tracked changes and the attached template.

Microsoft's Document Inspector page does not list mail merge settings among the things it finds and removes in Word, so do not rely on it for the data source; check the file as below.

Before you send a letter from a mail merge

  1. Never attach the data source, the main document, or the file of all the letters.
  2. Make the letter for this person alone: clear every other name in Edit Recipients, then Finish & Merge › Edit Individual Documents, and save that letter under a name of its own.
  3. Check the page count and the last page: it should be one letter.
  4. Show the field codes (Alt+F9 or Option+F9). Unlink any fields that are left, and read any rule's text before you do.
  5. Make it a normal Word document if it is still a mail merge document, or send a PDF instead.
  6. Check the properties, comments and tracked changes, as for any file.

How to check the file yourself

  1. Open it in Word for Windows. If it asks to run an SQL command, the file is still a mail merge main document; answer No, and see above.
  2. Make a copy, rename it to .zip and unzip it.
  3. Open word/settings.xml and search for mailMerge, connectString, query and dataSource. Open word/_rels/settings.xml.rels and look for a Target that is a path or a file name, and look for a word/recipientData.xml part.
  4. Search word/document.xml, and the header and footer parts, for MERGEFIELD and IF in the field codes (w:instrText and w:fldSimple).
  5. Search the whole folder for the names of other recipients, and for the name of the list.

What ScrubDrop does

ScrubDrop reads a .docx in your browser; the file is not uploaded. It lists a mail merge data source under links to other files (with its address, when the file records one as a link), along with the other kinds of hidden data it supports. For free, one file at a time, it removes the properties, the comments and the tracked changes (accepted); the mail merge settings (the connection string, the query and the data source's address) stay, and are listed. ScrubDrop Pro also removes links to other files, and with them the mail merge settings: the connection string, the query and the data source's address.

ScrubDrop does not change merge fields, the text a rule holds, or the letters in a merged file: they are part of the visible content, and only you can tell which letter belongs to whom. Unlink the fields and make the letter for one person in Word first. It reads the cleaned file again with separate parsers before it offers it. Macro-enabled files (.docm) are not handled; save the letter as .docx first.

Questions

Does a mail merge letter contain the whole recipient list?

The list's rows are in the data source; the main document holds where the list is and how Word reads it. But a file made with Edit Individual Documents holds a letter for every record that was merged, and the merge fields name the list's columns. Send a letter merged for one person, with its fields unlinked, or a PDF of it.

Why does Word ask to run an SQL command when someone opens my letter?

Because the file is still a mail merge main document, connected to its data source. Microsoft's page says the prompt is by design and that answering No opens the document without the data source attached. Make the letter a normal Word document, or merge a letter of its own for that person, before sending it.

Does Document Inspector remove the mail merge data source?

Microsoft's Document Inspector page does not list mail merge settings among what it finds and removes in Word. Check word/settings.xml in a copy of the file, as described on this page, or remove the connection in Word.

Sources: the Microsoft pages linked on this page were checked on 27 October 2026. ScrubDrop is not affiliated with Microsoft.

Check a letter before you send it, in your browser. Free: one file at a time; every supported kind of hidden data it finds is listed, and properties, comments and tracked changes are removed. Check a file.