I am using VBA to execute a URL to download a file from a website. The problem I have is caused by the fact that the URL is not a link to a file, but it is similar to the following link that one uses to download Firefox:
As you can see, this URL does not mention ".exe", but it downloads a .exe file anyway. I am using:Please Login or Register to view this content.
to cause the file to download, and my default browser is IE.Please Login or Register to view this content.
Anyway, the file download is initiated as I require, but IE opens the "Open, Save, Cancel" dialogue box and I don't know how to get my VBA to interact with it. Ideally I would like to Open the file (the one I am downloaded is an .xls file), but I don't know how to proceed from there. Perhaps there is an argument I can pass to explorer.exe to force the open?
Alternatively, if I set my default browser to Chrome then the file is automatically downloaded (no dialogue box), but there is no easy way for me to determine the file name (because the script on the website creates a new file name every time). If there is a way to determine the file name I could use that approach instead.
Can anyone help please?
[Incidentally, I am actually downloading a report from Salesforce.com, and I have used their Connect for Office Excel pulig-in successfully in the past, but the company I work for has implemented security that does not allow me access with this plug-in over VPN, even though I can access the report manually via the website over VPN; so if anyone has any specific suggestions there I would welcome them!]
Many thanks
Bookmarks