The extension is correctly appended if no path was passed to
FormSaveAsFile. If an initial path is desired, a
work-around is to enter an extension in the optional sDefExt
argument. If the user enters a filename with no extension, the
extension of the selected file type will be appended. For example,
if dBase III was selected, .DBF would be appended to the file name.
If the user selected a choice with no extension, for example All
Files (*.*), the first 3 letters of the sDefExt value would be used
as the extension. For example:
sPath = "c:\logfiles\";
sDefExt = "csv";
sTypes = "dBase III (*.dbf)|*.dbf|Csv Files (*.csv)|All Files (*.*)|*.*|";
sFile = FormSaveAsFile("Save As", sPath, sTypes, sDefExt);
|