ID: Q122232
The information in this article applies to:
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.
This problem occurs when your WINWORD6.INI file includes the following statement:
DOC-EXTENSION=.TXT
Microsoft has confirmed this to be a problem in the Word versions listed above. This problem was corrected in Microsoft Word 97 for Windows.
You can use a macro so that the File Open dialog box automatically uses the specific default extension in every session.
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
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
Last Reviewed: February 5, 1998