Document Editing Problems

Create a Doctor-Specific Mail Merge Greeting in Microsoft Word

Algirdas JasaitisAlgirdas Jasaitis Nov 14, 2026 869 views

Question details

Create a mail merge greeting that addresses doctors by last name and other recipients by first name.

Create a Doctor-Specific Mail Merge Greeting in Microsoft Word
Product
Microsoft Word Mail Merge
Device & OS
not provided
Scenario
A recipient list contains Salutation, FirstName, and LastName fields for a Word mail merge.
Observed behavior
Recipients whose Salutation is Dr. should receive a greeting such as Dear Dr. Smith; other recipients should be addressed by first name.
Before you start

Connect your recipient list through Mailings > Select Recipients and confirm that its column names are Salutation, FirstName, and LastName. Check that doctor salutations are consistently entered as Dr., including the period.

Solution 1Recommended

Insert an IF field for the conditional greeting in Word

Use a nested IF field to choose the greeting from each recipient's Salutation value.

The field compares Salutation with the exact value Dr. If it matches, Word uses the recipient's last name; otherwise, it uses the first name.

1
Place the greeting

In the Word merge document, click where you want the greeting to appear.

2
Create the field codes

In Word for Windows, press Ctrl+F9 for each pair of field braces, including the outer IF field and each nested MERGEFIELD. Enter the code so it reads: { IF { MERGEFIELD Salutation } <> "Dr." "Dear { MERGEFIELD FirstName }" "Dear Dr. { MERGEFIELD LastName }" }. Do not type the braces directly.

3
Update the field

Select the complete IF field and press F9. If needed, press Alt+F9 in Word for Windows to switch between field codes and their results.

4
Preview and complete the merge

Select Mailings > Preview Results and use the recipient navigation controls to check both doctor and non-doctor records. Then select Mailings > Finish & Merge to complete the merge.

Insert an IF field for the conditional greeting in Word
Match your column names: If your recipient list uses different column names, replace Salutation, FirstName, and LastName in the MERGEFIELD codes with the corresponding names from your list.
Free Microsoft Office alternative

Edit Mail Merge Documents with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility, making it easy to move documents and recipient spreadsheets between suites. Check conditional field behavior before migrating a Word mail merge.

Edit letters and recipient lists in one office suiteOpen and save Microsoft Word DOCX and Excel XLSX filesWork in a familiar, easy-to-use interfaceUse a free, lightweight alternative to Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why do I need Ctrl+F9 instead of typed braces?

Word uses special field braces to recognize field codes. In Word for Windows, press Ctrl+F9 for the outer IF field and for each nested MERGEFIELD.

What happens if the Salutation field is blank?

A blank value does not match Dr., so the IF field uses the FirstName greeting. Check blank salutations in the recipient list before completing the merge.

How can I check greetings for different recipients?

Select Mailings > Preview Results, then use the recipient navigation controls to view records with Dr. and other salutation values.

What if my data uses Dr without a period?

The example tests for Dr. with a period. Either make the Salutation values consistent in the source list or change the comparison text in the IF field to match your data.