VBScript Scripting Techniques > User Interaction > File Save Dialog

File Save Dialog

 

 
SAFRCFileDlg.FileSave
VBScript Code:
Set objDialog = CreateObject( "SAFRCFileDlg.FileSave" )

' Note: If no path is specified, the "current" directory will
'       be the one remembered from the last "SAFRCFileDlg.FileOpen"
'       or "SAFRCFileDlg.FileSave" dialog!
objDialog.FileName = "test_save.vbs"
' Note: The FileType property is cosmetic only, it doesn't
'       automatically append the right file extension!
'       So make sure you type the extension yourself!
objDialog.FileType = "VBScript Script"
If objDialog.OpenFileSaveDlg Then
    WScript.Echo "objDialog.FileName = " & objDialog.FileName
End If
Requirements:
Windows version: Windows XP
Network: N/A
Client software: N/A
Script Engine: any
Summarized: Works in all Windows XP versions.
Doesn't work in Windows 95, 98, ME, NT 4, and 2000, not sure about Windows Server 2003 or Vista.
 
Save File As dialog (SAFRCFileDlg.FileSave)
 
[Back to the top of this page]