CommonDialog and File Extension

Posted on 1998-11-05
Last Modified: 2010-04-30

Is it normal that when I want to save a file with a four
letter extension like HTML that it writes it as HTM?

How do you make it write the proper extension?
Question by:vip110598

Expert Comment

ID: 1443303
I don't think I have a real answer for you, but it has always been my understanding that an IBM PC (such as old DOS, Windows 95/98, etc.) will allow only a three-letter extension, whereas a MacIntosh or a computer using the UNIX operating system will allow the four-letter extension you want.  I guess it's due to feeding habits of the different beasts . . .

LVL 12

Expert Comment

ID: 1443304
There's a flag in the common Dialog control that will allow long file names. You have to set it for it to save in other than DOS 8.3 format.


LVL 12

Expert Comment

ID: 1443305
cdlOFNLongNames      &H200000       Use long filenames.
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.


Expert Comment

ID: 1443306

That's funny,
I use this flag and yet it still does not let me save an
extension with more than 3 characters.

is their any other way or could something be setting back
my flag to its default?


Author Comment

ID: 1443307

As idcanada mentioned,
when i use this flag, it still does not let me save a *.html.

LVL 12

Expert Comment

ID: 1443308
Dunno. It works ok here...

Do you have the MultiSelect flag on?

Check you windows settings.


Accepted Solution

idcanada earned 10 total points
ID: 1443309

Have a string keep the Dailogs Filename,
select case filterindex and manualy add the last letter of the ext.


Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question