logo
search
Document Editing Problems

How to Insert an IF THEN ELSE Mail Merge Field in Word

Bushra ParveenBushra Parveen Oct 10, 2026 869 views

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.

How to Insert an IF THEN ELSE Mail Merge Field in Word
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.
Before you start

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.

Solution 1Recommended

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.

1
Press Fn + Ctrl + F9

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.

2
Enter the conditional statement

Click inside the newly created brackets and type your IF statement, such as: IF { MERGEFIELD Score } > 60 "Pass" "Fail".

3
Test the condition

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 Function (Fn) Key Override for Field Braces
Alternative Toggle: If you need to view the raw code of an existing field, use Alt+F9 (or Fn+Alt+F9 on a laptop) to toggle between field codes and field results.
Easy Mail Merge with WPS Office

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. 1. Open your document: Launch WPS Writer and open the document you wish to use for your mail merge.
  2. 2. Connect data source: Navigate to the 'Mailings' tab, click 'Open Data Source', and select your data file.
  3. 3. Insert the condition: Click the 'Rules' button (or 'Insert Word Field') in the Mailings ribbon and select 'If...Then...Else...'.
  4. 4. Set parameters: Define your condition and the output text in the pop-up dialog, then click 'OK' to apply it.
Fully compatible with Microsoft Word (.docx) mail merge formats and codes.Visual 'Rules' dialog to configure IF THEN ELSE conditions effortlessly.Seamlessly connects to Excel and WPS Spreadsheet data sources.Lightweight, fast, and free alternative to expensive office suites.
microsoft office alternative - wps office

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.