Skip to main content.
Index | Support | Documentation | FAQ

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

MicroSoft Article ID : 825765

When you use Microsoft Office 2003 or Microsoft Office XP Service Pack 3 and open a mail merge main document, you experience one of the following symptoms:

You receive the following prompt:

Note: If you click Yes, the mail merge main document opens with the data source attached. If you click No, the mail merge main document opens without the data source attached.

This prompt exists in all versions of Office 2003 and was introduced in Office XP with Office XP Service Pack 3. This prompt was added in the products listed in the "Applies to" section to make mail merge more secure. If you click Yes when you receive the prompt, you let code to run on your computer

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 work around this behavior, disable the security prompt by using the SQLSecurityCheck registry key.

To disable the security prompt by using the SQLSecurityCheck registry key, follow the appropriate steps for your version of Microsoft Word.

Microsoft Office Word 2003

To do this, follow these steps:

Microsoft Word 2002 Service Pack 3

To do this, follow these steps: