Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Can i use the AccessibleObjectFromWindow() function to retrieve the address of the interface for the Outlook window object?
Korade, Pallavi
1
Reputation point
I am unable to retrieve pdocWdw parameter for Outlook, whereas it works well for MSWord.
WindowPtr pdocWdw;
HRESULT var = AccessibleObjectFromWindow( hControlWnd, DWORD(OBJID_NATIVEOM),
__uuidof(WindowPtr), (PVOID*)&pdocWdw );
_DocumentPtr pDoc;
if(pdocWdw != NULL)
{
pDoc = pdocWdw->Document;
}
For Word, pDoc = pdocWdw->Document; returns the proper value, but in case of Outlook it throws an com exception(0x800a13e9) from get_Document() method.
Can anybody please tell if Its correct to use AccessibleObjectFromWindow() for Outlook? If not, what alternative can I use?
Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Development | Other
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Sign in to answer