Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate IE right-click "Save Target As..."
Anyone who might know:
I am able to do limited work in automating IE via VBA. I am able to navigate to a website, select radio and option buttons, click links, and submit a form. If the form returns the request as HTML within the IE window I can pull off the information from IE and dump it into Excel. (I use something like "SetText ie.document.innerHTML" and then pull it off the clipboard). The website that I'm now accessing requires a username and password. I can get into the site via VBA and navigate to where I want and submit the form; however, my data now comes over according to a selected option. I can select the output as *.txt or *.csv. Since the website does not automaticaly load the data into the IE window as HTML I can't simply use the .innerHTML option. If I select the *.txt or *.csv output option and submit the form the output is returned in the IE window as a link. I can then programmatically click the link. If the output option is *.txt and I click the link, the text file is opened in the IE window. However, because it does not have a HTML format I cannot use .innerHTML to copy the data over. How can I programmatically get the text off of IE and into Excel? Additionally, I'm wondering how to programmatically right-click the link and select the "Save Target As..." option. I could select the output option as *.csv and then save the target. I could then use VBA to then open the *.csv file and copy the data over. Since the website requires a username and password a simple Workbooks.Open Filename:=http:... will not work. How can I programmatically perform the right-click "Save Target As..." option via VBA? Thanks in Advance, Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Save" and "Save As" options greyed out - "Save as Webpage" option | Excel Discussion (Misc queries) | |||
"Control" plus "click" doesn't allow me to select multiple cells | New Users to Excel | |||
Automatically click "Update Links" & "Continue" | Excel Programming | |||
Worksheets("Brackets").DropDowns("Game10").Click | Excel Programming | |||
VBA Code to automate "Save As" | Excel Programming |