“View Downloads” SaveAs and Close window handles names

Ludwigo

New Member
Joined
Sep 11, 2014
Messages
1
I am working on automating a report download through IE9, using a VBA Excel macro. I read many threads about this topic and had to compose between several, to adapt it to my situation.
Basically the automation navigates through several pages, checks options, and clicks on a download button. To bypass the Open/Save/Cancel bar on the bottom of IE9, which I didn't find a way to control, I use a sendkey for Control+J to get the View Dowload window pop up. From there I use some other sendkeys to get to the SaveAs button. (it works, but I wish I could use something else). I then have access with FindWindowEx to the next pop up, and save my file easily, with a pathname coming from my spreadsheet. Now after that I still need to close the View Downloads window before I can navigate somewhere else. I would need to know the name of the "windows"(buttons) SaveAs and Close in order to click on them. Something like this (this doesn't work) :
Code:
<code>wndw1 = FindWindow("#32770", "View Downloads - Windows Internet Explorer")
 Childwndw1 = FindWindowEx(wndw1, ByVal 0&, "Button", "&Close") 
SetForegroundWindow (Childwndw1) 
Sleep 1000 
SendMessage Childwndw1, BM_CLICK, 0, 0 
DoEvents</code>

I tried using uuSpy, but I don't see anything relevant. As for the SaveAs I know it must a bit more tricky, as it is a drop down menu and there may be several Save As buttons on the same window...but, if anyone knows about it, it would be great !! Thanks !!
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top