Your Word mail merge is half-done and something is wrong: fields show { MERGEFIELD FirstName } instead of names, ZIP codes lost their leading zero, recipients are missing, or every letter says “Error! Bookmark not defined.” Most of these problems come from a display setting, the Excel header row, or a leftover filter, not from a broken Word install.
Symptom-to-Fix Table
| Symptom | Likely Cause | Jump To |
|---|---|---|
Fields show as { MERGEFIELD Name } codes | Field codes display is on | Fix #1 |
| Fields show names like «FirstName», not real data | Preview Results is off | Fix #2 |
| A message about running an SQL command appears when you open the document | Word is reconnecting to your Excel file | Fix #3 |
| Some recipients never appear | Unchecked rows or an old filter | Fix #4 |
| Word can’t find the Excel file | File was moved, renamed, or deleted | Fix #5 |
| Fields are missing from the Insert Merge Field list | Bad header row or wrong sheet | Fix #6 |
| ZIP codes lose their leading zero | Excel stores the ZIP as a number | Fix #7 |
| Too many decimals, or dates in the wrong format | No formatting switch on the field | Fix #8 |
| Labels repeat one record or skip records | Next Record fields are missing or wrong | Fix #9 |
| “Error! Bookmark not defined.” in every letter | Broken TOC or cross-reference field | Fix #10 |
Quick Diagnosis: Display Problem or Broken Merge?
Run these two checks before you change anything. They show whether the merge is actually broken or whether Word is only showing it differently.
- Press
Alt + F9. This switches the whole document between field codes and field results (Microsoft’s Word keyboard shortcuts, retrieved 2026-10-27). If the codes turn back into normal text, the problem was only the display. - Go to Mailings > Preview Results. In Microsoft 365 desktop Word, this typically swaps placeholders for the real names and addresses from your spreadsheet when the data source is properly connected.
- Go to Mailings > Edit Recipient List. If this button is grayed out, or the list is empty, Word has no working data source. Go to Fix #5.
This guide covers desktop Word (Microsoft 365) on Windows 11 with an Excel data source. It assumes your merge was already set up.
Menu names and exact steps may vary slightly across different Microsoft 365 update channels or other Windows versions. For setup from scratch, see HDG’s How to Mail Merge from Excel to Microsoft Word and How to Use Mail Merge in Word to Create Letters, Labels, and Envelopes.
Common Issues and Solutions
Fix #1: Toggle field codes off with Alt + F9
Symptoms:
- Text like
{ MERGEFIELD FirstName }appears where a name should be - Curly braces show up around dates, page numbers, or a table of contents
Why it happens: The field codes view is turned on. It only changes what you see on screen. Your merge is not damaged.
Fix:
- Click anywhere in the document.
- Press
Alt + F9to switch the whole document back to field results. - To toggle just one field, click inside it and press
Shift + F9.
Verify: The braces are gone. You now see either «FieldName» placeholders or real data.
Fix #2: Turn on Preview Results
Symptoms:
- Fields show as «FirstName» or «City» instead of real data
- You can’t tell whether a specific record will merge correctly
Why it happens: Word shows field names like «FirstName» until you preview real data. This is standard behavior in Microsoft 365 desktop Word and does not mean the merge failed.
Fix:
- Go to Mailings > Preview Results.
- Use the record arrows in the Preview Results group to step through recipients.
- Check a few records, including the first and last row of your spreadsheet.
Verify: Each record shows different, correct data. If every record is blank, go to Fix #5 or Fix #6.
Fix #3: Click Yes on the SQL command message
Symptoms:
- When you reopen the main merge document, Word shows a message saying that opening it will run an SQL command
- The message names your Excel file or sheet
Why it happens: Word saves the link to your Excel file as a small database query. This is typical behavior when a document is linked to an external data source such as Excel, and Word asks for confirmation as a security check before running that query.
The exact wording of this message can vary between Word versions and update channels.
Fix:
- Read the file and sheet name listed in the message.
- Click Yes only if you created the merge document yourself and the named file is your own spreadsheet. Clicking Yes runs the saved query against that file and reconnects Word to the data source.
- If you don’t recognize the file, or someone else sent you the document, click No. A familiar file name alone doesn’t prove a document from someone else is safe. The document opens without its data link.
Verify: Go to Mailings > Edit Recipient List. Your recipients should appear.
Tip: If you click No by mistake, close the document without saving and reopen it.
Fix #4: Recheck rows and clear filters in Edit Recipient List
Symptoms:
- Some people from your spreadsheet never appear in the merged letters or labels
- The merge produces fewer documents than you have rows
Why it happens: In Microsoft 365 desktop Word with an Excel source, rows in Edit Recipient List normally have a checkbox.
An unchecked row, or a filter left over from an earlier mailing, skips that recipient without any warning.
Fix:
- Go to Mailings > Edit Recipient List.
- Scroll through the list and look for unchecked boxes.
- Check the box at the top of the checkbox column to include every row.
- Under Refine recipient list, click Filter.
- Remove any filter rules you don’t need (the dialog has a Clear All option), then click OK.
- Click OK to close Edit Recipient List.
Verify: In Preview Results, the record count should match the number of data rows in your spreadsheet.
Fix #5: Reconnect the Excel data source
Symptoms:
- Word says it can’t find or open the data source
- Edit Recipient List is grayed out or empty
- Recent edits to the spreadsheet don’t show up in Word
Why it happens: Word’s mail merge can use an Excel workbook as a data source. If that file was moved, renamed, or deleted, Word loses the connection.
The document may also still point to an old copy of the file or the wrong sheet.
Fix:
- Save the Excel workbook. Closing it as well avoids file-lock and stale-data problems.
- In Word, go to Mailings > Select Recipients > Use an Existing List.
- Browse to the current location of your Excel file and click Open.
- In the table selection dialog, pick the worksheet that holds your list.
- Make sure the option saying the first row of data contains column headers is checked, then click OK.
Verify: Edit Recipient List now shows your Excel file name as the data source, and your rows appear.
Tip: Keep the workbook in a folder that won’t move, such as your Documents folder, rather than Downloads or the desktop.
Fix #6: Fix the header row in Excel
Symptoms:
- Fields you expect are missing from Insert Merge Field
- Fields are named F1, F2, or show odd names
- Fields you inserted earlier stopped working after you renamed a column
Why it happens: In Microsoft 365 desktop Word, the first row of the selected Excel sheet is generally used as the field names for your merge.
A blank header cell, a merged header cell, a title row above the headers, or the wrong sheet can hide or mislabel fields as a result.
Fix:
- Open the Excel workbook.
- Delete any title rows or blank rows above your column headers, so the headers sit in row 1.
- Unmerge any merged header cells (Home > Merge & Center > Unmerge Cells).
- Give every column a short, unique name, such as
FirstName,Address1, orZIP. - Save and close Excel.
- Reconnect the file in Word using Fix #5.
- If you renamed a column, delete the old field from the Word document and reinsert it from Mailings > Insert Merge Field.
Verify: Every column header now appears in the Insert Merge Field list.
Fix #7: Format ZIP codes as Text in Excel
Symptoms:
- ZIP codes with leading zeros lose that zero after merging
- Account numbers or phone numbers lose leading zeros too
Why it happens: Mail merge pulls the underlying value from Excel, not what the cell looks like on screen. Excel can store a value with a leading zero as a plain number, dropping that zero, unless the column is formatted as Text.
A custom number format that only displays the zero won’t help, because the underlying stored value is still numeric.
Fix:
- In Excel, select the ZIP code column.
- Go to Home, open the Number Format dropdown, and choose Text.
- You may need to re-enter any ZIP codes that already lost their leading zero, since changing the column format alone won’t restore values already converted to numbers. Typing an apostrophe before a value, such as
'02134, forces Excel to treat it as text. - Save and close the workbook.
- In Word, reconnect the source (Fix #5) so Word reads the new values.
Verify: In Preview Results, check a recipient with a leading-zero ZIP code. The zero should be there.
Fix #8: Add a number or date format switch to the field
Symptoms:
- Amounts merge as
125.5or125.4999999instead of$125.50 - Dates merge in the wrong format, like
10/27/2026when you wantedOctober 27, 2026
Why it happens: A plain MERGEFIELD shows the raw value. Word’s field-code system supports optional “picture switches” inside the field.
The \# switch is generally used for number formatting and \@ for date formatting, though exact behavior can vary by Word version and regional settings.
Fix:
- Click inside the merge field you want to format.
- Press
Shift + F9to show that field’s code. - Click just before the closing brace and type a switch. For example:
- Currency:
{ MERGEFIELD Amount \# "$#,##0.00" } - Date:
{ MERGEFIELD EventDate \@ "MMMM d, yyyy" }
- Currency:
- Don’t type the braces yourself. Edit inside the ones that are already there.
- Press
Shift + F9to hide the code. - Press
F9to update the field.
Verify: Check several records in Preview Results. These examples show common formatting patterns, but exact output can vary by Word version and regional settings, so before a large print run, compare your switch against Microsoft’s field-code documentation.
Fix #9: Fix Next Record fields on labels
Symptoms:
- Every label on the sheet shows the same person
- Labels skip every other recipient
- Letters merge fine, but labels don’t
Why it happens: Letters don’t need Next Record fields. Word makes one letter per record automatically. Labels fit many records on one page, so each label after the first needs a «Next Record» field to move to the next row. If those fields are missing, you get repeats. If extra ones were added by hand, you get skips.
Fix:
- Press
Alt + F9and look at the label cells. Each cell after the first should start with aNEXTfield. - Delete any extra «Next Record» fields you added by hand.
- Set up only the first label the way you want it.
- Go to Mailings > Update Labels to copy that layout, with Next Record fields, to the other labels.
- Press
Alt + F9again to hide the codes.
Verify: In Preview Results, each label on the first sheet should show a different recipient, in spreadsheet order. Print one test page on plain paper and hold it against your Avery label sheets before printing on them.
Fix #10: Update or lock fields causing “Error! Bookmark not defined.”
Symptoms:
- “Error! Bookmark not defined.” appears in the same spot in every merged letter
- It sits where a table of contents, page reference, or cross-reference should be
Why it happens: This error commonly appears when a table of contents or cross-reference field in the main document points to a bookmark that was deleted or renamed.
Because the error lives in the main document, it’s copied into every merged result.
Fix:
- Save a copy of the main merge document first, then open the main merge document, not the merged output.
- Press
Ctrl + Ato select the document body, then pressF9to update the selected fields. Fields in headers and footers aren’t included in that selection, so click into a header or footer and repeat if the error appears there. - If the error remains, click the error text and press
Shift + F9to see which field and bookmark name it uses. - Re-create the missing bookmark, or delete the field and insert the cross-reference again.
- If the field doesn’t need to change during the merge, click inside just that field and press
Ctrl + F11to lock it. Or pressCtrl + Shift + F9to turn it into plain text.
Warning: Don’t press
Ctrl + Shift + F9with the whole document selected. That turns your merge fields into plain text too.
For a full walkthrough of every cause, see HDG’s How to Fix Bookmark Not Defined Error in Word.
Verify: Preview a few records. The error text should be gone from every one.
Error Messages Quick Reference
| Message or Display | What It Means | Fix |
|---|---|---|
{ MERGEFIELD Name } | Field codes view is on | Fix #1 |
| «FirstName» | Preview is off; not an error | Fix #2 |
| Opening this document will run an SQL command | Word is reconnecting to your data source | Fix #3 |
| Word can’t find or open the data source | Excel file moved or renamed | Fix #5 |
| “Error! Bookmark not defined.” | TOC or cross-reference points to a missing bookmark | Fix #10 |
| «Next Record» shows on labels | Normal for labels; it only causes trouble if missing or doubled | Fix #9 |
Word for the Web Limitations
Do your mail merge troubleshooting in desktop Word on Windows. Microsoft notes that the free web apps have fewer features than the desktop apps (Microsoft 365 vs. free web apps, retrieved 2026-10-27).
Field codes such as ASK also have limited support in Word for the web (Field codes: Ask field, retrieved 2026-10-27). If you only have browser Word, a Microsoft 365 Personal or Family subscription or a one-time Office Home 2024 purchase gets you the desktop apps.
Settings to Check
- Data source: Mailings > Edit Recipient List shows which Excel file is connected. Confirm it’s the current copy.
- Selected sheet: Mailings > Select Recipients > Use an Existing List. The wrong worksheet is a common cause of “missing” fields.
- Header row: Row 1 of the sheet needs one unique, un-merged name per column.
- Excel column format: ZIP codes and account numbers should be Text, not General.
- Rules fields: If you used Mailings > Rules for Ask or Fill-in prompts, see Microsoft’s Set the rules for a mail merge and Field codes: Set field (both retrieved 2026-10-27) to check that each Ref field matches its bookmark name.
Getting Help
If none of the fixes work, collect this before you ask for help:
- Your Word version from File > Account > About Word
- The exact error text, quoted word for word
- A screenshot of the document with
Alt + F9on - A copy of the spreadsheet with real names removed
Post these details in the Microsoft Community forums or contact Microsoft support through the Help tab in Word. Try a fresh test merge first: a new blank document plus a new three-row spreadsheet. If that works, your original files are the problem, not Word.
Prevention Tips
- Keep the data source in one place: Moving or renaming the Excel file breaks the link.
- Format before you connect: Set ZIP and ID columns to Text before linking the workbook.
- Don’t edit headers mid-merge: Renaming a column breaks any field already inserted with the old name.
- Close Excel before merging: Save and close the workbook, then reconnect if you changed it.
- Preview first, print second: Check the first, last, and a few middle records in Preview Results before any print run, especially on a laser printer with costly label stock.
- Fix the main document, not the output: Errors in the main document repeat in every merged copy.
Frequently Asked Questions
Why do my merge fields show as {MERGEFIELD} codes instead of names?
Field codes view is on. Press Alt + F9 to switch back. Nothing is broken.
How can I tell if my data source isn’t connected or it’s just a display setting?
Turn on Mailings > Preview Results. If real data appears, it’s connected. If Edit Recipient List is grayed out or empty, reconnect using Fix #5.
How do I stop ZIP codes from losing their leading zero?
Format the ZIP column in Excel as Text. You’ll likely need to re-enter codes that already lost their zero, then save and reconnect the file in Word.
Why does my mail merge skip rows from my Excel list?
A row is unchecked or a filter is active in Edit Recipient List. Recheck the rows and clear the filter (Fix #4).
Why do labels repeat or skip records when letters merge fine?
Labels depend on «Next Record» fields. Letters don’t. Set up the first label and click Update Labels (Fix #9).
Is it safe to click Yes on the SQL command message?
Click Yes only when you built the merge document yourself and the message names your own spreadsheet. That is Word reconnecting to your data. Click No for documents from other people or files you don’t recognize.
Why does “Error! Bookmark not defined.” show up in every merged letter?
This commonly happens because the broken field is in the main document, so every copy inherits it. Fix or lock it there before merging (Fix #10).
Wrapping Up
Start with Alt + F9 and Preview Results. Together they tell you in seconds whether you have a display quirk or a real data problem. If the merge is genuinely broken, the header row (Fix #6) and leftover recipient filters (Fix #4) are good next checks. If a brand-new test merge also fails in desktop Word, the cause is outside your files: it could be permissions, a policy restriction, or the Office install itself, so try an Office repair or ask your IT team or Microsoft support.
| Step | Action | Applies To |
|---|---|---|
| 1 | Press Alt + F9 | Codes showing instead of data |
| 2 | Turn on Preview Results | Any “is it broken?” check |
| 3 | Clear filters in Edit Recipient List | Missing recipients |
| 4 | Reconnect and fix the header row | Missing fields, lost connection |
| 5 | Format Excel columns as Text, add \# or \@ | ZIPs, currency, dates |
| 6 | Click Update Labels | Repeated or skipped labels |
| 7 | Update or lock TOC and cross-reference fields | “Error! Bookmark not defined.” |
Last updated: 2026-10-27 | Applies to Word desktop (Microsoft 365) on Windows 11 with an Excel data source