Results 1 to 3 of 3

Thread: download file dialog

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    6

    Arrow

    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.

  2. #2
    Guest
    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    6
    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
  •  



Click Here to Expand Forum to Full Width