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

ID: Q126556


The information in this article applies to:


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.


CAUSE

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:

  1. On the Start menu, click Run, and type the following
    <path>Setup /y
    where <path> is the path to your Microsoft Excel or Office Setup program.

    Setup starts in maintenance mode.


  2. Click the Reinstall button.


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

Microsoft Word for Windows

  1. In a text editor, such as Notepad, open your WIN.INI file (located in your Microsoft Windows directory).


  2. 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 (^).


  3. Close the WIN.INI file and save the changes.


Microsoft Word for Windows NT

  1. In Program Manager, choose Run from the File menu. In the Command Line box, type "REGEDT32" (without the quotation marks), and choose OK.


  2. In the Windows NT Registry, choose "HKEY_CURRENT_USER on Local Machine" from the Window menu.


  3. 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.


  4. From the Edit menu, choose Add Value.


  5. In the Value Name box, type "qry" (without the quotation marks). From the Data Type list, select REG_SZ. Choose OK.


  6. In the String box, enter the following
    
          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.


  7. Choose OK. From the Registry menu, and choose Exit to close the Registry Editor.


  8. Start Microsoft Word again.


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.


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:

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


Keywords          : xlquery offwin 
Version           : 4.00 4.20 4.30 7.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: June 7, 1999