Microsoft Word 2003 SQL Error

"Opening This Will Run the Following SQL Command" Message When You Open a Word Document

This problem has occurred on a workstation that has Microsoft Office 2003
installed and has attempted to integrate Microsoft Word with
Power Broker's Microsoft Word Integration. 

When attempting Step 4 in the Word Integration Express
document ( www.power-broker.com/wordinstaladvanced.htm ),
Microsoft Excel launches, and then Microsoft Word launches giving you the error message.

Click here for a Microsoft solution to this problem:
http://support.microsoft.com/?kbid=825765

 


"Opening This Will Run the Following SQL Command" Message When You Open a Word Document

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

SUMMARY

When you open a Word 2003 mail merge main document that is linked to a data source, you may receive the following message:
 

Opening this will run the following SQL command:
SELECT * FROM C:\file_name.log
Data from your database will be placed in the document. Do you want to continue?

MORE INFORMATION

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.
This message helps protect you from unintentionally sending data to a malicious user. You can use a VBA macro with the command to suppress this message:

application.DisplayAlerts=wdAlertsNone

However, you must first create the following registry key

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options

"SQLSecurityCheck"=dword:00000000

To do this, follow these steps:
 

  1. Open Registry Editor.
  2. Locate, and then click the following registry key:

    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options

  3. Click Edit, point to New, and then click DWORD Value.
  4. Under Name, type:

    SQLSecurityCheck

  5. Double-click SQLSecurityCheck.
  6. In the Value data box, type:

    00000000

  7. Click OK.

The information in this article applies to:

  • Microsoft Office Word 2003