I'm trying to automate the Internet Explorer open-save-close download manager popup using Excel VBA.
Right now I know the following sendkeys works:
I'd rather use sendmessage or postmessage. I've been trying the following with no luck.
I've tried every variation on lparm that I could think of. Sendmessage always returns a value of 0 and postmessage always responds with a value of 1 (success).
The reason I've tried directuihwnd is because the spy program I'm using says directuihwnd is the handle of the popup with framenotificationbar being the parent.
Any help would be appreciated.
I'm running IE10 & Excel 2010
Bob
Right now I know the following sendkeys works:
Code:
ieframe = FindWindow("ieframe", "Report Output - Windows Internet Explorer provided by Cisco")
framenotificationbar = FindWindowEx(ieframe, 0&, "frame notification bar", vbNullString)
SetForegroundWindow framenotificationbar
SendKeys "%O", True ' send key ALT O
I'd rather use sendmessage or postmessage. I've been trying the following with no luck.
Code:
Dim WM_CHAR As Long
Dim wParam As Long
Dim lParam As Long
WM_CHAR = &H102
VK_MENU = &H12 'ALT key
wParam = &H4F ' upper case O
lParam = &H8C '0 repeat, alt key active, key being pressed
ieframe = FindWindow("ieframe", "Report Output - Windows Internet Explorer provided by Cisco")
framenotificationbar = FindWindowEx(ieframe, 0&, "frame notification bar", vbNullString)
directuihwnd = FindWindowEx(framenotificationbar, 0&, "directuihwnd", vbNullString)
temp = SendMessage(framenotificationbar, WM_CHAR, wParam, lParam)
temp = PostMessage(framenotificationbar, WM_CHAR, wParam, lParam)
temp = SendMessage(directuihwnd, WM_CHAR, wParam, lParam)
temp = PostMessage(directuihwnd, WM_CHAR, wParam, lParam)
I've tried every variation on lparm that I could think of. Sendmessage always returns a value of 0 and postmessage always responds with a value of 1 (success).
The reason I've tried directuihwnd is because the spy program I'm using says directuihwnd is the handle of the popup with framenotificationbar being the parent.
Any help would be appreciated.
I'm running IE10 & Excel 2010
Bob