PDA

Click to See Complete Forum and Search --> : download file dialog


jon cooper
Feb 1st, 2001, 11:06 AM
Does anyone know how to display the "download a file" dialog box using vbscript? I am looking for a script that will prompt the user "Open from current location" and "or, Save to disk" no matter which type of file is referenced. I.E., now if I do an href to a Word Document (in html) IE5 opens the doc automatically in its Word Browser thing, I want a prompt.

Thanks for any help.

Feb 1st, 2001, 01:23 PM
Use the DoFileDownload API function.


Private Declare Function DoFileDownload _
Lib "shdocvw.dll" (ByVal lpszFile As String) As Long


Private Sub Command1_Click()

Text1.text = "http://www.mysite.com/myfile.zip"
Dim sDownload As String
sDownload = StrConv(Text1.text, vbUnicode)
Call DoFileDownload(sDownload)

End Sub

jon cooper
Feb 1st, 2001, 05:39 PM
Thanks alot, it looks like that'll be exactly what I need.