Re: Auto File Download



Write your script-equivalent code to get the corrent URL generated then use
wininet to download it.
For more information about accessing the Dynamic HTML (DHTML) Object Model,
see http://msdn2.microsoft.com/en-us/library/bb508515(VS.85).aspx


--
Sheng Jiang
Microsoft MVP in VC++
"JonWayn" <JonWayn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4A3CFD63-1D25-4D9C-8525-E0A7853F9543@xxxxxxxxxxxxxxxx
The click event is suppose to download a file from an unknown url, the
file
having an unknown name until the click event is handled. In other words,
each
time you download a file, a very arcane name is generated. Without knowing
where the file is coming from (all that information is packeged in a java
script), and the file name, I dont know how to add my own custom
functionality to the button. I can see the script name. Is there a way to
run
a script stored on a remote server, given the name of the script? After
posting my initial message, I realized that the click method of that
button
did not even do what it should. In the UI of IE, clicking the button would
pop the File Download dialog with Open/Save/Cancel options. However, Using
GetElementById to return a reference to the button and then applying the
click method of that button in codes, does nothing. I eventually had to
shell
out to IE, rather than using the WebBrowser control in order to get things
going. It would still be nice though to find out if there is a way to get
the
WB ctl to behave like an IE window

"Sheng Jiang[MVP]" wrote:

Check how the click event is handled and replace the button's onclick
event
with your own equivalent functions.
For more information about HTML element events, search for "Handling
html
element events"

--
Sheng Jiang
Microsoft MVP in VC++
"JonWayn" <JonWayn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E52AADB3-0007-49BA-80E4-817F4570809D@xxxxxxxxxxxxxxxx
I am using VBA with MSAccess and the webbrowser control to download a
file. I
have successfully done this numerous times when the download process
is
initiated by a hyperlink, in which case, the url to the file is
available
through the HRef property of the link. However, in this case, the
process
is
initiated by a button, which has no property that tells the URL of the
file.
Clicking this button pops a modal dialog giving the options to save,
open
or
cancel. How can I get this file downloaded without the display of this
dialog?

Thanks for any help





.