A
ATS
HOWTO Get Outlook COM from IAccessible.
Please help,
We are so close, but we just can not close the gap. We are trying to
automate Outlook. We want a way to save a selected set of emails and an
opened email to file just like Outlook's File-Save-As feature, without any
GUI. We have an external EXE this is kind of like Spy++, where it gets the
IAcessible object of Outlook for a mouse position, with no problem as such:
IAccessible *pIAccessible = NULL;
AccessibleObjectFromPoint(cpCurrentMousePosition, &pIAccessible, &cvTemp),
pIAccessible->QueryInterface(IID_IServiceProvider, (void **)
&pIServiceProvider),
Now, we stuck. If this was Internet Explorer, we could try to get an
IHTMLElement object or an IHTMLWindow object as such:
pIServiceProvider->QueryService
(
IID_IHTMLElement,
IID_IHTMLElement,
(void **) &pIHTMLElement
),
In doing this, we would not even have to KNOW in advance that the
IAccessible object was over IE, because if the
pIServiceProvider->QueryService worked for IHTMLElement or IHTMLWindow, we
would know. We could then get IE's DOM, and do what ever we needed.
For Outlook, we now know it supports IAccessible. We can use it to capture
basic IAccessible data, but we want to get to that File-Save-As, so we can
save selected emails and opened emails to file as an EML/MSG file. We wish we
could somehow look at the VTable of the IAccessible and know which COM
interfaces it supports, but we do not know how.
Please help, any ideas from this point would really help.
Please help,
We are so close, but we just can not close the gap. We are trying to
automate Outlook. We want a way to save a selected set of emails and an
opened email to file just like Outlook's File-Save-As feature, without any
GUI. We have an external EXE this is kind of like Spy++, where it gets the
IAcessible object of Outlook for a mouse position, with no problem as such:
IAccessible *pIAccessible = NULL;
AccessibleObjectFromPoint(cpCurrentMousePosition, &pIAccessible, &cvTemp),
pIAccessible->QueryInterface(IID_IServiceProvider, (void **)
&pIServiceProvider),
Now, we stuck. If this was Internet Explorer, we could try to get an
IHTMLElement object or an IHTMLWindow object as such:
pIServiceProvider->QueryService
(
IID_IHTMLElement,
IID_IHTMLElement,
(void **) &pIHTMLElement
),
In doing this, we would not even have to KNOW in advance that the
IAccessible object was over IE, because if the
pIServiceProvider->QueryService worked for IHTMLElement or IHTMLWindow, we
would know. We could then get IE's DOM, and do what ever we needed.
For Outlook, we now know it supports IAccessible. We can use it to capture
basic IAccessible data, but we want to get to that File-Save-As, so we can
save selected emails and opened emails to file as an EML/MSG file. We wish we
could somehow look at the VTable of the IAccessible and know which COM
interfaces it supports, but we do not know how.
Please help, any ideas from this point would really help.