View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sheetjo sheetjo is offline
external usenet poster
 
Posts: 3
Default "File Download" dialog box

Hi,
Please try the following link.it might help:
http://www.webdeveloper.com/forum/sh...d.php?t=104022

Add following code to your web page
Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
..Open
..Type = 1
..LoadFromFile (server.MapPath(StrFilePath))'Full Physical Path to File
End with
With Response
..Clear
..AddHeader "Content-Disposition", "attachment; filename=" & StrFile & ""
'Filename
..Charset = "UTF-8"
..ContentType = "application/save"
..BinaryWrite objStream.Read
..Flush
End With
objStream.Close
set objStream = nothing

"BPD" wrote:

David, thanks for the tip. However the dialog box I'm trying to
identify/manipulate is not an Excel db. Rather, it's the "File
Download" db that pops up in an Internet Explorer window when trying to
download a file from a site, giving the options (via buttons) to Open
or Save the file or Cancel the download.

Again, I can't figure out what object hierarchy the db belongs to (IE,
Shell, ShellWindows?), or is it even an object at all?

Currently, I'm opening the file using Sendkeys and sending "O" to click
the Open button, but I hate having to rely on Sendkeys.

Any further help and/or direction you can point me in is much
appreciated.

Thanks,

Brian