Rich Text Format-based mail merge document no longer connected to data source in Word

Article translations Article translations
Article ID: 840936 - View products that this article applies to.
Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
Expand all | Collapse all

On This Page

SYMPTOMS

When you open a Microsoft Word mail merge main document that is linked to a data source, the links may no longer function. You experience the following symptoms:
  • When you open the main document, you do not receive a warning message that is similar to the following:
    Opening this document will run the following SQL command
  • Most of the buttons on the Mail Merge toolbar are unavailable.
  • If you display the Mail Merge pane, you are on step 1 of the Mail Merge Wizard instead of on step 3.

    To display the Mail Merge pane in Microsoft Office Word 2003, point to Letters and Mailings on the Tools menu, and then click Mail Merge.

    To display the Mail Merge pane in Microsoft Office Word 2007, click the Mailings tab, click Start Mail Merge in the Start Mail Merge group, and then click Step by Step Mail Merge Wizard.

CAUSE

This behavior occurs when the main document is in Rich Text Format (RTF). Microsoft Office 2003 Service Pack 1 (SP1) and the 2007 Microsoft Officeprograms include a fix to prevent documents in RTF from having links to data sources.

RESOLUTION

To resolve this behavior, use one of the following methods.

Method 1: Save the main document in Word 2003 format or in Word 2007 format

To save the main document in Word 2003 format or in Word 2007 format, follow these steps:
  1. Open the main mail merge document in Word.
  2. Follow the steps in Method 2 to reattach the data source.
  3. In Word 2003, on the File menu, click Save As.

    In Word 2007, click the Microsoft Office Button, and then click Save As.
  4. In Save as type, select Word Document.
  5. Click Save.

Method 2: Locate the data source

You can re-attach the data source every time that you open the main mail merge document. To do so, follow these steps.

Word 2003
  1. Open the main mail merge document.
  2. On the Tools menu, point to Letters and Mailings, and then click Show Mail Merge Toolbar.
  3. On the Mail Merge toolbar, click Open Data Source.
  4. Select the data source, and then click Open.
Word 2007
  1. Open the main mail merge document.
  2. Click the Mailings tab, click Select Recipients in the Start Mail Merge group, and then click Using Existing List.
  3. Select the data source, and then click Open.

Method 3: Disable the fix in Office 2003 SP1 or in Office 2007

Note The following method may not work in all situations. For example, if you use a Microsoft Excel worksheet or a Microsoft Access database as your data source, and the mail merge main document is in RTF, adding the CalcDataFieldOnOpen registry setting may not change the behavior that is described in the Symptoms section. In this situation, you must use method 1 or method 2 to resolve the behavior.

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
To disable the fix that is described in Office 2003 SP1 or in Office 2007, follow these steps:
  1. Start Registry Editor.
  2. On a computer that is running Office 2003 SP1, locate and then click the following subkey in the registry:
    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options
    On a computer that is running Office 2007, locate and then click the following subkey in the registry:
    HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options
  3. On the Edit menu, point to New, and then click DWORD Value.
  4. Under Name, type CalcDataFieldOnOpen.
  5. Double-click CalcDataFieldOnOpen.
  6. In the Value data box, type 1.
  7. Click OK, and then quit Registry Editor.
Note Detaching the data source from an RTF main document helps protect you from unintentionally sending data to a malicious user. By locating the correct data source, you know that you are sending the correct information.

MORE INFORMATION

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
825765 You receive the “Opening this will run the following SQL command” message when you open a Word mail merge main document that is linked to a data source

Properties

Article ID: 840936 - Last Review: January 2, 2007 - Revision: 4.2
APPLIES TO
  • Microsoft Office Word 2007
  • Microsoft Office Word 2003
Keywords: 
kboffice2003sp1fix kbprb KB840936

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com