File Open Dialog Doesn't List Files with Different Extensions

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 

Additional query words: 6.0 winword ntword wordnt 7.0 word95 word7 word6

Keywords :
Version : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a; winnt:6.0
Platform : WINDOWS winnt
Issue type :


Last Reviewed: December 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.