Microsoft KB Archive/126556

= WD: MS Query Button Doesn't Appear in Open Data Source Dialog Box =

Article ID: 126556

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Word 95 Standard Edition
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 6.0 Standard Edition

-



This article was previously published under Q126556



SYMPTOMS
In Microsoft Word, when you use the Open Data Source dialog box in either Mail Merge Helper or Insert Database, the MS Query button may not appear, even if Microsoft Query is installed on your computer.



Microsoft Word for Windows 95
Normally, the MS Query button appears in the Open Data Source dialog box if Microsoft Query is installed on your computer. However, the MS Query button does not appear in the Open Data Source dialog box if Microsoft Query is not registered in the Windows Registry.

Microsoft Word for Windows
The MS Query button does not appear, even if Microsoft Query is installed on your computer, when the [Extensions] section of your WIN.INI file does not contain a line that associates .QRY extensions with the Microsoft Query application.

Note that if this line is missing, the MS Query button appears in the Open Data Source dialog box after you run Microsoft Query during the current session of Microsoft Word. However, when you close and then restart Word, the MS Query button does not appear.

Microsoft Word for Windows NT
The MS Query button does not appear in the Open Data Source dialog box if Microsoft Query is not registered in the Windows NT Registry. Microsoft Query should be registered in the Extension folder under HKey_Current_User on Local Machine.



WORKAROUND
To correct this problem, use the appropriate method below.

Microsoft Word for Windows 95
To restore the registry entry for Microsoft Query, you can run the Setup program for the program that installed Microsoft Query (either Office or Microsoft Excel) using the /y switch by doing the following:

 On the Start menu, click Run, and type the following

Setup /y

where is the path to your Microsoft Excel or Office Setup program.

Setup starts in maintenance mode. Click the Reinstall button.

Instead of copying files, Setup immediately begins registering the program components again.

Microsoft Word for Windows
 In a text editor, such as Notepad, open your WIN.INI file (located in your Microsoft Windows directory).  Locate the [Extensions] section, and enter the following line: qry=C:\WINDOWS\MSAPPS\MSQUERY\msquery.exe ^.qry where C:\WINDOWS is your Microsoft Windows directory. Note that there must be a space before the caret character (^).  Close the WIN.INI file and save the changes.</li></ol>

Microsoft Word for Windows NT
 In Program Manager, choose Run from the File menu. In the Command Line box, type "REGEDT32" (without the quotation marks), and choose OK.</li> In the Windows NT Registry, choose "HKEY_CURRENT_USER on Local Machine" from the Window menu.</li> Double-click the Software subfolder. Double-click the Microsoft subfolder. Double-click the Windows NT subfolder. Double-click the Current Version folder. Single-click the Extension folder.</li> From the Edit menu, choose Add Value.</li> In the Value Name box, type "qry" (without the quotation marks). From the Data Type list, select REG_SZ. Choose OK.</li>  In the String box, enter the following <pre class="fixed_text">     c:\winnt35\msapps\msquery\msquery.exe ^.qry where c:\winnt35 is your Microsoft Windows NT directory. Note that there must be a space before the caret character (^) in this line. </li> Choose OK. From the Registry menu, and choose Exit to close the Registry Editor.</li> Start Microsoft Word again.</li></ol>

Note that both of these workarounds add MS Query Files (*.qry) to the List Files Of Type list in the Open Data Source dialog box.

<div class="moreinformation_section">

MORE INFORMATION
Microsoft Query is an ODBC-supported, data access application that is shipped with Microsoft Office (versions 4.0 and later) and Microsoft Excel (versions 5.0 and later). You can run Microsoft Query by itself, or use Microsoft Query from within Microsoft Excel or Microsoft Word.

In Microsoft Word, you can run Microsoft Query by choosing the MS Query button in the Open Data Source dialog box. To display the Open Data Source dialog box, do either of the following:


 * Choose Database from the Insert menu, and then choose the Get Data button.

-or-
 * From the Tools menu, choose Mail Merge. Choose the Get Data button (assuming that you have already created a main document), and then select Open Data Source.

Additional query words: 4.20c 4.30c 5.00 5.00c 6.00a 6.00c word6 msquery query unavailable

Keywords: KB126556

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.