How to Use Conditional Fields in Word for Mac Mail Merge
Question details
The user needs to include distribution lines in a Word for Mac mail merge only when the corresponding Excel source fields are not blank, but standard Windows shortcuts for field codes do not work.

- Product
- Word for Mac
- Device & OS
- Mac
- Scenario
- Setting up a mail merge document that relies on conditional logic (IF fields) to display dynamic text based on the contents of an Excel data source.
- Observed behavior
- Windows keyboard shortcuts like Shift+F9 fail to generate field braces on Mac, and manually typing ordinary curly brackets does not produce valid, working merge fields.
Ensure your Excel data source is properly linked to your document, and verify your Mac's keyboard settings to know if you need to hold the 'fn' key when pressing function keys.
Insert IF Fields Using the Command+F9 Shortcut
Use the dedicated Mac shortcut to generate valid field braces for your conditional statements, ensuring Word recognizes the logic.
In Word for Mac, you cannot type standard curly brackets to create a merge field. You must use a specific keyboard shortcut to generate functional field braces.
Press Command+F9 (or fn+Command+F9, depending on your Mac settings) to insert a pair of functional field braces { } into your document.
Click inside the braces and type your IF statement, such as: IF { MERGEFIELD Distribute1 } <> "" "Distribution Line" "".
To insert the inner merge field (like MERGEFIELD Distribute1), you must press Command+F9 again while inside the main IF field to create a second, nested set of valid braces.

Use the Insert Field Menu and AutoText
If keyboard shortcuts conflict with macOS system settings, use Word's built-in ribbon menu to insert fields manually.
Try WPS Office for a Smoother Mail Merge Experience
If you are struggling with complex field codes and keyboard shortcut conflicts in Microsoft Word for Mac, consider switching to WPS Office. It provides an intuitive Mail Merge feature that is fully compatible with Microsoft Word and Excel files, making document automation simple and completely free.
- 1. Open your document in WPS Writer: Launch WPS Office and open your main document where you want to perform the mail merge.
- 2. Access the Mail Merge tab: Navigate to the 'References' or 'Mailings' tab and click on 'Mail Merge' to activate the intuitive wizard.
- 3. Connect your data source: Click 'Open Data Source', select your Excel file, and use the simple 'Insert Merge Field' button to add your data points without dealing with manual curly brackets.

Frequently Asked Questions
Why isn't Command+F9 working to insert fields on my Mac?
Your Mac's keyboard may be configured to use the top row as media keys by default. You may need to press fn+Command+F9. Additionally, macOS features like Mission Control might be mapped to F9, intercepting the command before Word receives it.
Can I manually type the curly brackets for mail merge fields?
No. Microsoft Word requires special field braces to recognize the text as a programmable command. Typing standard curly brackets using Shift+[ or Shift+] will only insert regular text, and your merge fields will not function.
How do I toggle field codes on and off in Word for Mac?
To reveal or hide the underlying field codes in Word for Mac, press Option+F9 (or fn+Option+F9). This allows you to inspect and edit the logic of your IF fields instead of viewing the final merged results.




