|
-
Feb 1st, 2001, 12:06 PM
#1
Thread Starter
New Member
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, 02:23 PM
#2
Use the DoFileDownload API function.
Code:
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
-
Feb 1st, 2001, 06:39 PM
#3
Thread Starter
New Member
Thanks alot, it looks like that'll be exactly what I need.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|