File Open Dialog Doesn't List Files with Different Extensions (122232)



The information in this article applies to:

  • Microsoft Word for Windows 6.0
  • Microsoft Word for Windows 6.0a
  • Microsoft Word for Windows 6.0c
  • Microsoft Word for Windows 95
  • Microsoft Word for Windows 95 7.0a
  • Microsoft Word for Windows NT 6.0

This article was previously published under Q122232

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
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB122232