Returns or sets the default filename extension for the dialog box.
Object.DefaultExt [ = sDefaultExt ]
The DefaultExt property syntax has the following parts:
Name |
Type |
Description |
Object |
ACommonDialog |
ACommonDialog control |
sDefaultExt |
BString |
The default filename extension. |
Use this property to specify a default filename extension, such as .txt or .doc.
When a file with no extension is saved, the extension specified by this property is automatically appended to the filename.
The following example will set the default filename extension to .txt:
cdlg1.DefaultExt=".txt"
FileName, InitialDir, OpenOptions, SaveAsOptions, ShowSaveAs