If you’ve worked with mail merge letters, you are probably no stranger to seeing the occasional error. These errors are typically due to security and the way Microsoft Word attempts to protect you and itself from abuse. Below are a few common errors and what can be done to eliminate them. I’ve snipped this content from the ResultsPlus User Assistance, so never fear, you’ve got the answers at your fingertips all the time!
SQL Command Message
If you are doing a mail merge with Microsoft Word and receive a message that reads, "Opening this will run the following SQL command", click Yes.
This is a Microsoft security message. To prevent the message from appearing, you need to set a registry value. You can do this by following the steps in Microsoft KB article 825765.
"No fields to merge" Message
For mail merge to work in a network environment, two things must be done, both of which relate to the user's Windows profile.
- The server with the file share for ResultsPlus must be added to the workstation’s local intranet sites (accessed via Control Panel|Internet Options|Security|Local Intranet). This sets up a trust relationship that enables mail merge to work from the word processing application on the user's workstation to the actual word processing document on the network.
- The SQLSecurityCheck registry value must be set for each user’s profile on the workstation from which the user works. This can be done in one of two ways.
a. Follow the steps in the Microsoft KB article 825765, or
b. Run the ResultsPlus tool chest utility to set the registry value. To get the password needed to run the tool chest utility, contact Customer Support. This program is password protected because it can make registry changes, which require administrator-level security.
"mergeFields() empty" message
The first time you perform a mail merge in one of the later versions of Word with a document created in an earlier version, Word may display a message about “mergeFields() being empty. There are several reasons this can happen; one common reason is that Microsoft changed the way it works with header files in Word 2007 and newer.
In earlier versions of Word, the program used a relative path to header files, defaulting to header files with the same file name in the same directory as the mail merge document. In Word 2007 and newer, the program uses the path explicitly identified in a mail merge document. If the header file does not contain any data (i.e., it contains only the header record), Word will not allow you to update the document by saving the header. What does this mean? It means that if you move your documents to a new machine or directory, you may get the error again. (Good thing it’s easy to resolve!)
- Open the mail merge document in Word (independently of ResultsPlus).
- Open the Mailings tab on the ribbon.
- Click the Edit Recipient List button.
- On the Mail Merge Recipients screen, check the checkbox in the header row (next to “Data Source”).
- Click OK.
- Click the Save button in Word.
The document should now work fine in future mail merges.