Print this page

Blank or Underscore values when generating Mail Merge documents. Duplicate or Doubled values when generating Mail Merge Documents.

Knowledge Article Number 000175191
Description You are getting blanks or underscores (__) in Merge Fields instead of the expected value when generating a Mail Merge Document. Or you are getting duplicate/doubled value in merge field instead of singe value
Resolution
This often happens when the merge field format is incorrect.
 
1. Open the Mail Merge template that is giving you an issue with MS Word Application (Using other free applications such as Open Office or Libre Office applies only for Mail Merge that uses a readily available Database stored in Scalc or Excel. You will not be able to modify the Merge Fields).
 
2. Once open, you should see your Data Fields enclosed within the "Chevron" merge characters as shown in the image below:

Merge Fields

3. To see the actual Merge Field codes, press Alt + F9 on your keyboard and you will see the Data Fields replaced with Merge Fields as shown in the image below:

Merge Fields

NOTE: Editing the value in the Data Field DOES NOT automatically change the value in the Merge Field code. Alternately, editing the code DOES NOT automatically change the Data Field as well. The Data Field is basically like the interface while the Merge Field code is what determines the value when generating the Mail Merge Document.

TIP: When correcting or editing the Merge Field code, edit the Data Field as well to avoid confusion.

4. Check if the Merge Field code is following the correct format:

- OBJECT_FIELD_NAME or FIELD_NAME
- Contact_Last_Name or Last_Name

So the code should look something like this: {MERGEFIELD Contact_Last_Name \* MERGEFORMAT}

5. There are times when the issue is not with code but the Data Field itself which is actually NOT a code. Typing the field in double LESS THAN (<<) or GREATER THAN (>>) symbols does NOT automatically make it a merge field.

e.g. <<Contact_Last_Name>> compared to this image Merge Fields where the field is enclosed in Chevrons.

TIP: To ensure you’re using the correct syntax, use Connect for Office to insert merge fields into your mail merge template. Refer to the following Help Article.

Installing Connect for Office
https://help.salesforce.com/HTViewHelpDoc?id=office_install.htm&language=en_US

6. Alternatively, you can manually enter the Merge Field code through the following Steps as detailed in the accompanied images. (Word 2007 is used)

a. Click on the "Insert" tab > "Quick Parts" > "Field..."

User-added image

b. The Field dialog box opens, choose "Mail Merge" in the "Categories:" drop-down menu.

User-added image

c. Select "MergeField" in the "Field names" list, and enter the name of the field with the correct format in "Field name:" field then click OK.

User-added image

You should now have the correct Data Field and Merge Field format. Try pressing on Alt + F9 to verify the code.

In case you see doubled/duplicate value also the Alt + F9 works and will indicate something similar to the one below
Getting the value «Account_Industry1» as  "AgricultureAgriculture" in the mail merge

Doing a Alt + F9 will indicate this

{MERGEFIELD ACCOUNT_INDUSTRY1 \* MERGEFORMAT}{MERGEFIELD ACCOUNT_INDUSTRY1 \* MERGEFORMAT}
The solution is to delete the second merge field


Also refer to Underscore values for Empty Fields when generating Mail Merge documents




promote demote