Microsoft KB Archive/138274

= WordBasic Returns MS-DOS Path with Wrong Capitalization =

Article ID: 138274

Article Last Modified on 8/17/2005

-

APPLIES TO


 * Microsoft Word 95 Standard Edition

-



This article was previously published under Q138274



SYMPTOMS
When you use any of the following WordBasic commands, the information may be returned in either all uppercase letters or mixed uppercase and lowercase letters.

FileName$

Files$

GetAddinName$

SelectionFileName$

FileNameInfo$



CAUSE
Any file or folder (directory) originally created under MS-DOS will be returned in all uppercase letters.

Files and folders created under Windows 95 are returned with the same capitalization as they were created.

For example, if you create a file in MS-DOS named OLDDOS.TXT and run the following macro on it: Sub MAIN MsgBox FileName$ End Sub Word will show its name as     C:\My documents\DOSDIR\OLDDOS.TXT



WORKAROUND
Give the file or folder a new name in Windows 95:
 * 1) Using Windows Explorer, click the file or folder.
 * 2) Press F2 and type a different temporary name.
 * 3) Press ENTER.
 * 4) Press F2 and retype the original name with the desired capitalization.
 * 5) Press ENTER.

The WordBasic commands will now return the expected results.

Renaming the file or folder with the same name isn't sufficient; you must give the file a new name first and then give it the original name.

Additional query words: 7.0 word95 word7 file macro capital winword upper case lower

Keywords: kbmacro KB138274

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.