Link to home
Start Free TrialLog in
Avatar of Amos_5-24
Amos_5-24

asked on

Finding Save as dialog box in IE 10

I am attempting to automate the download & processing of spreadsheets from a web-based system, using MS Access 2007, Windows 7 (64-bit)

I've found on the web techniques for automating the save As dialog box, but I suspect these techniques relate to older versions of IE.

In particular, the techniques rely on finding the dialog window using FindWindow("#32770","Save As")

For me this always returns 0 instead of the hWnd.

Is the class name "#32770" still correct (I imagine so!) and can someone tell me what the new window name is? Or is there an alternative (not using SendKeys)?
Avatar of Amos_5-24
Amos_5-24

ASKER

OK - I've now ascertained that the dialog window name is of course "Windows Internet Explorer" and managed to get a hWnd for it. However, it doesn't seem that the list of options are buttons - are they? How do I click the 'Save' or 'Save As' in code without resorting to SendKeys?
As nobody else seems to want to comment, I've now found out some more for myself. First, there's an excellent MS article  that I now can't find the link to (!) with a VB project that I've used to list all open windows. I edited it to start at the hWnd of one of the windows, and realised that the Save As button is a bit further down the hierarchy so I'm going to write a couple of recursive routines to get the hWnd of buttons etc that are descendants but not first generation children of the window one has found.

My only issue now is going to be how to wait for the download to have completed before going off & processing the downloaded file. I guess I'm going to have to examine the process but I'll have to do some testing on a large file to give me time.
ASKER CERTIFIED SOLUTION
Avatar of Amos_5-24
Amos_5-24

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial