DefaultExt Property (ACommonDialog)

Returns or sets the default filename extension for the dialog box.

Syntax

Object.DefaultExt [ = sDefaultExt ]

The DefaultExt property syntax has the following parts:

 

Name

Type

Description

Object

ACommonDialog

ACommonDialog control

sDefaultExt

BString

The default filename extension.

Comments

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.

Example

The following example will set the default filename extension to .txt:

cdlg1.DefaultExt=".txt"

Applies to

ACommonDialog

See Also

FileName, InitialDir, OpenOptions, SaveAsOptions, ShowSaveAs