In Microsoft Word for Microsoft 365 on Windows, open the merge document and choose Mailings > Rules to see the available mail merge rules. To inspect rules already inserted in the document, press Alt+F9 to show all field codes, or select a rule and press Shift+F9 to show that field’s code.
The Rules menu is where you add rules; it is not a separate list of every rule in the document. To review what a particular rule does, examine its field code, then use Preview Results or complete a small test merge to check its effect on real recipient records.
Where the Rules menu appears
Mail merge rules are fields in a mail merge main document. In the desktop version of Word, the rules are on the Mailings tab. Choose Rules in the Write & Insert Fields group. The menu contains commands for inserting rules such as If…Then…Else, Next Record, and Skip Record If.
If Rules is unavailable or appears inactive, first check that you are working in the desktop Word app and that the document is set up as a mail merge. You can start one from Mailings > Start Mail Merge, choose a document type, and connect a recipient list through Mailings > Select Recipients. A rule needs a merge document context: it is not a general-purpose command for ordinary text files.
Also distinguish the Rules menu from the data-source controls. Select Recipients connects or changes the list of people or records, while Insert Merge Field adds a field such as First_Name or City. Rules use conditions or record movement to control how those fields are used.
Set up the merge before inspecting rules
Before reviewing a complicated document, identify its merge type and recipient source. Choose Mailings > Start Mail Merge and check whether the document is a letter, email message, labels, or another supported format. Then choose Mailings > Select Recipients to connect the correct list. The available merge fields depend on the columns in that list, so an IF rule that refers to a field name must match a field in the current source.
For example, imagine a recipient list with columns called FirstName, Region, and Discount. A letter might insert FirstName in its greeting and use Region in an IF rule to show a regional notice. If the list is replaced with one that calls the same column Area, a rule that still refers to Region may no longer work as intended. Checking the source early helps separate a rule problem from a data problem.
If you inherited the document, save a copy before changing its rules. It can also help to turn on Mailings > Preview Results after selecting the source. Preview displays the document with values from individual records, while the underlying merge fields remain in the document.
Show the rule field codes
Word normally displays the result of a field rather than its instructions. For instance, a merge field may show a recipient’s name in Preview Results, while its code identifies which source column supplies that value. Press Alt+F9 on Windows to switch between field results and codes throughout the document. To inspect only one field, click or select it and press Shift+F9. Repeat the shortcut to return to the result view.
Field-code view can reveal more than the Rules menu. You can see nested fields, the exact merge-field name used by an IF condition, and any text or instruction included in the field. A conditional field might look like this in Word’s code view: { IF { MERGEFIELD Region } = "West" "Include the regional offer." "Use the standard message." }. It checks the Region value and displays one of two text results.
The braces shown around fields are special Word field characters, not ordinary curly-brace characters typed from the keyboard. When building a rule, use the command on the Rules menu rather than typing braces and expecting Word to recognize them as a functioning field. If you need to edit the code, make the change inside the actual field and then switch back to results to inspect it.
What the different rules do
Opening Mailings > Rules shows the commands Word can insert. The rules most readers encounter have different jobs:
- If…Then…Else compares a field with a value and inserts one result when the condition is true and another when it is false. It is useful for optional wording, such as a different message for a particular region.
- Skip Record If omits a recipient record when its condition is met. For example, it can skip records where an eligibility field has a value that means the person should not receive the mailing.
- Next Record advances to the next recipient at that point in the document. It is especially useful in a labels merge, where each label usually needs a different recipient.
- Next Record If advances when its condition is true. It can support layouts where the decision to move to another record depends on a field value.
- Merge Record # and Merge Sequence # insert record numbers. They can help identify or number records, but they do not mean the same thing: one relates to a record’s position in the recipient source, while the other numbers records included in the merge.
- Ask and Fill-in prompt for information during the merge process. Ask can store a response in a bookmark for reuse; Fill-in supplies prompted text at the location where the field is used.
- Set Bookmark assigns a value to a bookmark, often in combination with Ask or another field.
Not every merge needs a rule. If every recipient gets the same wording and each record is used once, ordinary merge fields may be enough. Rules are useful when the output should vary, skip a record, or control which recipient appears at a position in the document.
Review, edit, or remove a rule
To inspect one rule, find the relevant location in the document, select the field, and press Shift+F9. Read the code, noting the field names, comparison value, and the text or field results in each branch. For a Next Record or Skip Record If rule, check where it sits relative to the merge fields; placement can change which recipient’s data appears in a section.
To create or replace a rule, position the cursor where the result belongs and use Mailings > Rules to choose the appropriate command. Word opens a dialog for rules that need conditions or prompts. Review the available field names and comparison choices, then insert the rule. The exact dialog depends on the rule type.
To remove a rule, select its field in the document and delete it, taking care not to remove surrounding text or a neighboring merge field. If field codes are showing, confirm that you selected the complete field rather than only part of its instructions. After editing, switch back to results and preview several records. A change that looks correct for one person may behave differently for records with blank or unusual values.
Preview the rule with real records
Field-code view tells you what the rule says; a preview tells you what it produces for a selected recipient. Choose Mailings > Preview Results, then use the record navigation controls in the Mailings tab to move among recipients. Check records that should take each branch of an IF rule, not just the first person in the list.
For a conditional notice, test at least one record where the condition is true and one where it is false. Also look for blanks, inconsistent capitalization, extra spaces, and values that do not exactly match the condition. A rule comparing Region with West may not treat a blank or a differently written value as West. The field code can be syntactically sound and still produce an unwanted result because the source data differs from expectations.
When the logic is important, make a small test merge before producing the full set. Choose Mailings > Finish & Merge and select an appropriate output option, such as editing individual documents, then review the generated document. Preview is useful for record-by-record checking, but the merged output lets you check page breaks, label order, repeated text, and the final layout together.
Common problems when viewing rules
- You see a value instead of a rule. Toggle field-code display with Alt+F9 or select the field and use Shift+F9. Preview Results can also make fields appear as recipient data.
- The rule command is unavailable. Confirm you are using desktop Word, have a merge document, and have started or selected a merge type. Check that the correct document is open rather than a generated output copy.
- An IF rule always shows one result. Check the exact source-field name and comparison value, then preview records expected to satisfy both outcomes. Look for blanks, inconsistent data, or a condition that is more restrictive than intended.
- A record appears in the wrong label or section. Inspect the position of Next Record and Next Record If fields. In a labels merge, record-advancing fields are part of controlling which recipient fills each label.
- The field code looks broken after editing. Avoid manually typing field braces. Restore or reinsert the rule using the Rules command, and check that the actual field is selected as a whole.
- The merged document differs from the preview. Review the completed output, confirm the recipient list and selected records, and check page layout as well as rule results. A preview of a few records does not verify every record in a large list.
Word for Mac and Word for the web
In Word for Microsoft 365 on Mac, mail merge commands are on the Mailings tab, and the Rules menu is available in the desktop app. The names and arrangement of ribbon controls can vary slightly by Word build. On many Mac keyboards, Option+F9 toggles field-code display; function-key settings may require holding Fn as well. If that shortcut does not work, use Word’s field-code display command or the Mailings controls in your installed version.
Word for the web is not the right place to build and run a full mail merge. Open the document in the desktop Word app to use the merge workflow and inspect its rules. This is especially important for a document received from someone else: the web version may show document content, but the desktop app is needed for the full set of merge commands.
Frequently Asked Questions
Where is the Rules button in Word?
In desktop Word, open the Mailings tab and choose Rules in the Write & Insert Fields group. The command is intended for a mail merge main document.
How do I see mail merge field codes instead of results?
Press Alt+F9 on Windows to toggle codes for all fields, or select a field and press Shift+F9 to toggle only that field. Use the same shortcut again to return to the displayed result.
Can I view all rules in one list?
Word provides a Rules menu for inserting rules, but it does not present existing rules as a single document-wide inventory. Review the document in field-code view and inspect each rule where it appears.
Why can’t I click Rules in Word?
You may be in Word for the web, an ordinary document rather than a merge main document, or a document without an active merge setup. Open it in desktop Word and check Mailings > Start Mail Merge and Select Recipients.
How can I tell whether an IF rule works?
Use Preview Results and navigate to at least one record that should meet the condition and one that should not. For important mailings, create a test merge and inspect the finished output before generating the complete set.
Related
- Insert a Personal Signature in Word for Mac: Steps & Tips
- Insert a Personal Signature in Word Online: Steps and Tips
- How to Insert Multiple Tables of Contents in Word
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Insert a Horizontal Line Under a Heading in WordTo add a line beneath a heading in Microsoft Word, click in the heading paragraph, then choose Home…
- Excel Data Validation List: Allow Multiple Values?Excel’s standard data validation list lets a cell accept one item from a dropdown; it does not let…
- Excel Drop-Down Lists with Named Ranges: Setup and TipsTo create an Excel drop-down list from a named range, define a name for the cells containing your…
- Can You Automatically Alphabetize Tabs in Google Sheets?Yes, you can alphabetize sheet tabs in Google Sheets, but there is no built-in command that sorts them…
- How to Double Space in Word for the WebTo double-space text in Word for the web, select the text, open Home > Line and Paragraph Spacing,…
- Insert a Horizontal Line in Word With a ShortcutTo insert a horizontal line in Microsoft Word with the keyboard, start a new, empty paragraph, type three…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.