How to Insert an IF THEN ELSE Mail Merge Field in Word
Question details
The user needs to create a conditional IF THEN ELSE mail merge field but is unable to generate the required field delimiters because the Ctrl+F9 shortcut is not functioning on their laptop.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Creating customized mail merge documents using conditional formatting and dynamic fields.
- Observed behavior
- Pressing Ctrl+F9 fails to insert the necessary curly braces {} for field codes, preventing the user from setting up the conditional merge field.
Ensure your data source, such as an Excel spreadsheet or contact list, is properly connected to your document before setting up conditional mail merge fields.
Use the Function (Fn) Key Override for Field Braces
Fix the shortcut issue on laptops by using the Fn key combination to properly insert field code delimiters.
On many laptops and modern keyboards, the top row of F-keys defaults to media or system controls (like volume or screen brightness). Because of this, the standard Ctrl+F9 shortcut for inserting Word field delimiters won't work unless you override the media keys.
Hold down the 'Fn' key and the 'Ctrl' key, then press 'F9'. This will insert the special field braces { } with a gray highlight. Never type these braces manually using the standard bracket keys.
Click inside the newly created brackets and type your IF statement, such as: IF { MERGEFIELD Score } > 60 "Pass" "Fail".
Navigate to the 'Mailings' tab on the ribbon and click 'Preview Results' to verify that the conditional text displays correctly based on your data source.

Use the Ribbon Rules Menu (No Shortcuts Required)
Insert IF THEN ELSE rules directly through the Word Ribbon if keyboard shortcuts remain unresponsive.
Create Conditional Mail Merges Easily in WPS Writer
WPS Writer offers an intuitive Mailings interface that makes inserting IF THEN ELSE rules straightforward, bypassing the need to memorize complex keyboard shortcuts.
- 1. Open your document: Launch WPS Writer and open the document you wish to use for your mail merge.
- 2. Connect data source: Navigate to the 'Mailings' tab, click 'Open Data Source', and select your data file.
- 3. Insert the condition: Click the 'Rules' button (or 'Insert Word Field') in the Mailings ribbon and select 'If...Then...Else...'.
- 4. Set parameters: Define your condition and the output text in the pop-up dialog, then click 'OK' to apply it.

Frequently Asked Questions
Can I manually type the curly braces {} for field codes?
No, manually typing standard curly braces using the keyboard bracket keys will not work. Word will just treat them as normal text. You must use the designated shortcut (Ctrl+F9 or Fn+Ctrl+F9) or the Rules menu to insert functional field delimiters.
Why isn't my conditional mail merge field updating?
Field codes do not always update automatically on the screen in real-time. To force an update, press Ctrl+A to select the entire document, and then press F9 (or Fn+F9) to refresh all field codes.
How do I switch between viewing the code and the final text?
You can toggle between viewing the underlying field code (e.g., { IF... }) and the final text result by pressing Alt+F9 (or Fn+Alt+F9) on your keyboard.




