What mail merge does and when you need it
Mail merge takes a list of names, addresses, or other information and automatically fills them into a template letter or email. Instead of typing each recipient's details by hand, you create one document with placeholders, connect it to your list, and the software generates a personalized version for each person. This saves hours when you're sending the same message to dozens or hundreds of people but want each one to feel addressed to them specifically.
You use mail merge when you're sending form letters to job applicants, invoices to clients with different amounts owed, birthday cards with individual names, or newsletters where the greeting changes but the body stays the same. The two most common tools are Microsoft Word (which has a built-in merge feature) and Gmail (which uses a free add-on called Mail Merge by Yet Another Mail Merge, or YAMM).
Key Takeaways
- Mail merge requires two files: a template document with placeholder fields and a spreadsheet list containing the actual names, addresses, or other details you want to insert.
- In Word, you create the template, then use the Mailings tab to connect it to your data source and preview before printing or saving merged documents.
- In Gmail, you install the YAMM add-on, paste your data into a Google Sheet, and the add-on generates individual emails that you can review and send one at a time or in batches.
- The most common mistake is mismatched column names — if your template looks for "FirstName" but your spreadsheet says "First Name" with a space, the merge will fail or show blanks.
- Always preview the merge with at least three different rows before sending anything, because errors in the template or data source affect every single message.
Setting up your data in a spreadsheet
Before you open Word or Gmail, prepare your data in a spreadsheet — either Excel, Google Sheets, or even a CSV file. Each column should be a different piece of information: FirstName, LastName, Email, Company, Amount, or whatever fields your template will need. The first row must contain the column headers (the names of each field), and every row below that is one person's information.
Keep the headers simple and consistent. Use "FirstName" not "First Name", "Email" not "email address", and avoid special characters or spaces. If you're merging into a letter, you might need FirstName, LastName, Street, City, State, Zip. If you're merging into an invoice, you need Company, Amount, InvoiceNumber, and DueDate. Write down exactly what column headers you use — you'll need to match them exactly in your template.
Save the spreadsheet in a location you can find easily. If you're using Word, save it as an Excel file (.xlsx) or CSV (.csv). If you're using Gmail, keep it in Google Sheets so the add-on can read it directly. Double-check that there are no blank rows in the middle of your data, because the merge will stop when it hits an empty row.
Creating a mail merge template in Word
Open a new Word document and write the letter or form exactly as you want it to appear, except where you need personalized information. For example, write "Dear [FirstName]," instead of typing an actual name. Then highlight the part that should change and replace it with a field code that matches your spreadsheet column header.
To insert a field code in Word, go to the Mailings tab at the top. Click Insert Merge Field and select the column name from your spreadsheet — if your spreadsheet has a column called "FirstName", select that. Word will insert it as «FirstName» (with the special angle brackets). Do this for every piece of information that changes: «FirstName», «LastName», «Company», «Amount», and so on.
Your template might look like this:
Dear «FirstName» «LastName»,Thank you for your interest in the position at «Company». We are pleased to offer you a salary of «Amount» per year.Sincerely,Human Resources
Save this document with a clear name like "OfferLetter_Template.docx". Do not fill in any actual names or numbers — the merge will do that automatically.
Connecting your template to your data in Word
With your template open, go to the Mailings tab and click Select Recipients. Choose Use an Existing List and navigate to your spreadsheet file. Word will ask which sheet to use if your file has multiple sheets — select the one with your data.
Once you've connected the data, click Preview Results to see what the merged documents will look like. Word will show you the first person's information filled into the template. Use the arrow buttons to scroll through a few rows and check that the names, amounts, and other details are correct. If something looks wrong — a blank field, a misspelled name, or a field that didn't merge — go back and fix either the template (if the field code is wrong) or the spreadsheet (if the data is wrong).
When everything looks correct, click Finish & Merge. You have three options: print the merged documents directly, send them as email (if you're merging email addresses), or save them as individual files. For most situations, choose Edit Individual Documents to save them as a single Word file with all the merged letters, which you can then print, save, or email as needed.
Using mail merge in Gmail with YAMM
Gmail doesn't have a built-in mail merge feature, but the free add-on Mail Merge by Yet Another Mail Merge (YAMM) does the same job. First, install it: go to Gmail, click the Settings gear, select Get add-ons, search for "Mail Merge by Yet Another Mail Merge", and click Install. You'll need to grant it permission to access your Gmail account.
Next, create your data in a Google Sheet. Set up columns for FirstName, LastName, Email, and any other fields you need. Save the sheet and note its exact name — you'll tell YAMM where to find it. Then compose a draft email in Gmail with your template text. Use «FirstName» and «LastName» (with the angle brackets) wherever you want personalized information to appear, just like in Word.
Once your email draft is ready, open the YAMM add-on from the Gmail sidebar (look for the YAMM icon). Click Create New Mailing, select your Google Sheet, and YAMM will automatically detect your column headers. It will show you a preview of the first email with the merge fields filled in. Review it carefully, then click Schedule Send or Send Now. YAMM can send emails immediately or schedule them to go out over time, which is useful if you're sending hundreds of messages and don't want to overwhelm your recipients' inboxes all at once.
Common mistakes and how to fix them
The most frequent error is a mismatch between your template field names and your spreadsheet column headers. If your template says «FirstName» but your spreadsheet column is labeled "First Name" (with a space), the merge will show a blank or an error code instead of the actual name. Before you start merging, write down your exact column headers and use them exactly in your template — no extra spaces, no different capitalization.
Another common problem is blank rows or extra spaces in your data. If row 5 is completely empty, Word will stop merging at row 4. If a cell contains leading or trailing spaces (like " John " instead of "John"), the merge will include those spaces, which can look sloppy. Clean your spreadsheet before you start: delete any blank rows, and use Find & Replace to remove extra spaces if needed.
A third mistake is not previewing before sending. Always click Preview Results in Word or check the first email in YAMM before you commit to merging hundreds of documents. A typo in your template or a wrong column name will be replicated in every single message, and you'll have to start over.
Frequently Asked Questions
Can I merge conditional text, like "Dear Mr. Smith" for men and "Dear Ms. Smith" for women?
Yes, but it requires a more advanced feature called an IF field. In Word, go to Mailings > Insert Merge Field > Insert Merge Field (dropdown arrow) > Rules > If...Then...Else. You'll set up a condition based on a column in your spreadsheet — for example, "If Gender = Male, insert Mr., otherwise insert Ms." This is more complex than a basic merge, so test it thoroughly with a few rows before running the full merge.
What if I want to send merged emails but keep them as drafts instead of sending them immediately?
In Gmail with YAMM, you can choose Save as Drafts instead of Send Now. This creates one draft email for each person in your list, and you can review and send them individually or in batches. In Word, you can't send email directly — instead, save the merged documents and attach them to individual emails, or copy and paste each merged letter into a separate email.
Can I use mail merge with attachments?
In Word, the merged documents themselves become the attachment — you save them as individual files and attach each one to an email. In Gmail with YAMM, you cannot attach files directly through the merge process. You would need to send the merged email first, then manually add attachments, or use a more advanced tool like Google Apps Script if you need to automate attachments.
What happens if my spreadsheet has 500 rows — will the merge work?
Yes, mail merge works with any number of rows. Word will create a merged document for each row, and YAMM will generate an email for each row. The only limit is your computer's memory and Gmail's sending limits — Gmail allows you to send up to 500 emails per day, so if you're merging 500 emails, you may need to split them across multiple days or use the scheduling feature to space them out.
Can I merge into a template that already has formatting, images, or a logo?
Yes. Your template can include images, colors, fonts, tables, and any other formatting you want. The merge fields (like «FirstName») will be inserted into the formatted document, and the formatting stays intact. Just make sure the merge fields are placed where you want the personalized information to appear, and test with a preview to confirm the formatting looks right.