How to get Inspector object from Window handle

T

Tom

Hi,

I post this question on Outlook-General and administrator suggest me putting
here.

I am able to get any window handle from outlook. For each of these window
handle I've tried AccessibleObjectFromWindow( hWnd, (DWORD)OBJID_NATIVEOM,
IID_IDispatch, (void**)&pDispWindow); I am able to get Word.Document object
from a window class as "_WwG". But I am not able to get Outlook.Inspedtor
object from any of these window.

Is there any way to get Outlook.Inspedtor object from one of these window?

Thanks in advance.

Tom
 
D

Dmitry Streblechenko

You can how the other way around? For a given window handle, find its
topmost parent, then compare that handle with all the window handles for
each inspector in the Application.Inspectors collection (use IOleWindows for
each inspector).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
T

Tom

Thanks Dmity, finally I am able to find a way to get Inspector object.
Because there is only ONE Outlook running in one system. I am able to get
Outlook Application object without window handle. From Application object I
have no problem doing anything as same in VBA.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top