Hi All,
I have the below mentioned code which downloads the file from a website.
but the issue is that it doesn't directly download the file on the given path it gives a popup box to get the confirmation from the user that he wants to "Open", "Save" or "Cancel" the download. I want that the user shouldn't get any such popup and the code should directly download the file to the given path apart from this I want to use the same code to download multiple files at one go.
The below code works fine for one link but if I try to download the files from multiple links it doesn't work.
Here is my code :
[vba]
Sub Downloadfilesfromnet()
'Need to reference to Microsoft Internet Controls
Dim URL As String
Set IE = CreateObject("internetexplorer.application")
URL = "http://www.xyz.com/abc.zip" 'for TEST
Dim IE As Object
IE.Visible = True
IE.Navigate URL
Do While IE.ReadyState <> 4
DoEvents
Loop
SendKeys "%S"
IE.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DODEFAULT 'SaveAs
End Sub
[/vba]
Thanks a for your help in advance.
I have the below mentioned code which downloads the file from a website.
but the issue is that it doesn't directly download the file on the given path it gives a popup box to get the confirmation from the user that he wants to "Open", "Save" or "Cancel" the download. I want that the user shouldn't get any such popup and the code should directly download the file to the given path apart from this I want to use the same code to download multiple files at one go.
The below code works fine for one link but if I try to download the files from multiple links it doesn't work.
Here is my code :
[vba]
Sub Downloadfilesfromnet()
'Need to reference to Microsoft Internet Controls
Dim URL As String
Set IE = CreateObject("internetexplorer.application")
URL = "http://www.xyz.com/abc.zip" 'for TEST
Dim IE As Object
IE.Visible = True
IE.Navigate URL
Do While IE.ReadyState <> 4
DoEvents
Loop
SendKeys "%S"
IE.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DODEFAULT 'SaveAs
End Sub
[/vba]
Thanks a for your help in advance.