save dialog box problem using vb script
-
Hi all I am using vb script to open save dialog box in asp.net. This works fine in xp but it is not working in vista or windows 7 . I am using following code to execute the script Sub savedialog() set objDialog = CreateObject("SAFRCFileDlg.FileSave") objDialog.FileName = "C:\Scripts\Script1.vbs" objDialog.FileType = "VBScript Script" intReturn = objDialog.OpenFileSaveDlg if intReturn Then Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile(objDialog.FileName) objFile.WriteLine Date objFile.Close else Wscript.Quit End if End Sub How i run it in windows vista or seven .
-
Hi all I am using vb script to open save dialog box in asp.net. This works fine in xp but it is not working in vista or windows 7 . I am using following code to execute the script Sub savedialog() set objDialog = CreateObject("SAFRCFileDlg.FileSave") objDialog.FileName = "C:\Scripts\Script1.vbs" objDialog.FileType = "VBScript Script" intReturn = objDialog.OpenFileSaveDlg if intReturn Then Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile(objDialog.FileName) objFile.WriteLine Date objFile.Close else Wscript.Quit End if End Sub How i run it in windows vista or seven .
What are you trying to accomplish with this? This isn't necessary to save a file. Please remember in the future to format any code snippets using the pre tags
I know the language. I've read a book. - _Madmatt
-
Hi all I am using vb script to open save dialog box in asp.net. This works fine in xp but it is not working in vista or windows 7 . I am using following code to execute the script Sub savedialog() set objDialog = CreateObject("SAFRCFileDlg.FileSave") objDialog.FileName = "C:\Scripts\Script1.vbs" objDialog.FileType = "VBScript Script" intReturn = objDialog.OpenFileSaveDlg if intReturn Then Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile(objDialog.FileName) objFile.WriteLine Date objFile.Close else Wscript.Quit End if End Sub How i run it in windows vista or seven .
A quick google indicates that SAFRCFiledlg was deprecated - http://groups.google.com/group/microsoft.public.windows.server.scripting/browse_thread/thread/c76386961cf68359/89e053aff2f57d19?lnk=st&q=file+open+dialog+VBSCRIPT+VISTA&rnum=1&hl=en#89e053aff2f57d19[^] Scott