3

I want to automate IE9 via VBA to save a downloaded csv-file to my local HDD without interaction. As the file is generated as a result of a database query on the server, there is no fix URL. I am not allowed to alter IE safety settings, so I strand on the IE9 InfoSecurityBar.

While looking for a solution, I found how to realize similar tasks

<http://www.siddharthrout.com/2011/10/23/vbavb-netvb6click-opensavecancel-button-on-ie-download-window/> ff.

  • in earlier IE versions (controlling the "File Download" window)

  • if the URL is known (via the "URLDownloadToFile" API or SID's FDL.exe)

I also tried uuSpy but was not able to find out how to control this safetyBar. Did anyone succeed with a similar problem?

rwulf
  • 31
  • 1

1 Answers1

0

Are you sure you cannot find out the url of the file from the source code of the web site? If you were able to do this, you can simply create a GET request using httpxml object.

So the step1 would be to use GET request to load the content of the page and then use DOMDocument to get corresponding xml tag from the site and identify where the href points...

This then bypasses the IE completely and you are using pure html requests, so no warnings appear.

Community
  • 1
  • 1
ex-man
  • 369
  • 2
  • 7