File Open Dialog Doesn't List Files with Different Extensions

Last reviewed: February 5, 1998
Article ID: Q122232
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word for Windows, NT version 6.0

SYMPTOMS

When you add or modify the DOC-EXTENSION line (located in the WINWORD6.INI file) to specify a default file extension, the File Open dialog box displays "*.DOC" (without the quotation marks) in the File Name text box, and the List Files of Type box appears empty. When you select Word Documents from the List Files Of Type box, Word uses the default extension you specified on the DOC-EXTENSION line in the WINWORD6.INI file. However, the File Open dialog box displays correctly during the current session of Word only.

CAUSE

This problem occurs when your WINWORD6.INI file includes the following statement:

   DOC-EXTENSION=.TXT

STATUS

Microsoft has confirmed this to be a problem in the Word versions listed above. This problem was corrected in Microsoft Word 97 for Windows.

RESOLUTION

You can use a macro so that the File Open dialog box automatically uses the specific default extension in every session.

Word 6.0, 6.0a, and 6.0c for Windows

  Sub MAIN
    Ext$ = GetPrivateProfileString$("Microsoft Word",
"DOC-EXTENSION", "WINWORD6.INI")
    If Ext$ = "" Then Ext$ = "doc"
    Dim dlg As FileOpen
    GetCurValues dlg
    dlg.Name = "*." + Ext$
    If Dialog(dlg) = - 1 Then FileOpen dlg
  End Sub

Word 6.0 for Windows NT and Windows 95

  Sub MAIN
    Ext$ =
GetPrivateProfileString$("HKEY_CURRENT_USER\Software\Microsoft\Word\6. \Options", "DOC-EXTENSION", "")
    If Ext$ = "" Then Ext$ = "doc"
    Dim dlg As FileOpen
    GetCurValues dlg
    dlg.Name = "*." + Ext$
    If Dialog(dlg) = - 1 Then FileOpen dlg
  End Sub


KBCategory: kbusage kbmacro buglist6.0 buglist6.0a buglist6.0c
buglist7.0 fixlist97
KBSubcategory:
Additional reference words: 6.0 6.0a 6.0c winword ntword wordnt 7.0
7.0a word95 word7 word6
Version : 6.0 6.0a 6.0c 7.0 7.0a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.