How to get Inspector object from Window handle

Status
Not open for further replies.
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)

-

"Tom" <Tom> wrote in message

news:BFAA1DEB-87DE-4960-B604-113EF5099AF2@microsoft.com...
> 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
>
 
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

"Dmitry Streblechenko" wrote:


> 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)
>

>

>

> -
> "Tom" <Tom> wrote in message
> news:BFAA1DEB-87DE-4960-B604-113EF5099AF2@microsoft.com...
> > 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
> >


> .
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Outlook 2010 How could I globally redesign an outlook template form/region/inspector template used to display mail lists or an individual mails? Outlook VBA and Custom Forms 0
B Auto Preview Attachment in Inspector Reading Pane Outlook VBA and Custom Forms 1
D help with Item/Inspector close event Outlook VBA and Custom Forms 1
T New Inspector word editor crash Outlook 2003 Outlook VBA and Custom Forms 3
A running code after the new inspector is visible Outlook VBA and Custom Forms 1
N Modal form is not properly working on inspector Outlook VBA and Custom Forms 10
K add a designed group into a existing inspector ribbon Outlook VBA and Custom Forms 7
E Accessing a Form Region from an Inspector Outlook VBA and Custom Forms 3
E Accessing a Form Region from an Inspector Outlook VBA and Custom Forms 3
K Get Inspector Ptr In Outlook 2007. Outlook VBA and Custom Forms 3
T How to get Inspector or MailItem from wordEditor Outlook VBA and Custom Forms 6
S PR_MESSAGEFLAGS & Compose/Read - Inspector Outlook VBA and Custom Forms 4
S Error 287 on Inspector.Close() Outlook VBA and Custom Forms 4
K Buttons are added multiple times in New Inspector window Outlook VBA and Custom Forms 4
V How to find mailitem in the inspector is a brand new one Outlook VBA and Custom Forms 2
A active inspector in memory Outlook VBA and Custom Forms 1
B How to get the path from an outlook.Inspector Outlook VBA and Custom Forms 4
M How to get active inspector window handle? Outlook VBA and Custom Forms 3
A disable a menu in active inspector Outlook VBA and Custom Forms 1
S inspector toolbar buttons get multiple events Outlook VBA and Custom Forms 3
S Quick access toolbar in inspector window Outlook VBA and Custom Forms 3
T Using Ribbon in Inspector window Outlook VBA and Custom Forms 2
P Inspector.WordEditor always returns null Outlook VBA and Custom Forms 3
Q Inspector Bug/Question Outlook VBA and Custom Forms 3
Z Inspector.CurrentItem causes Shared Calendar Issue Outlook VBA and Custom Forms 5
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
vodkasoda Object could not be found Error in Outlook 2007 Outlook VBA and Custom Forms 5
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
P Automate Outlook Start - No Active Explorer Object Found Using Outlook 10
J Object Variable or With Block Not Set Error in Outlook 2016 and not Outlook 2013 Outlook VBA and Custom Forms 3
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
J Outlook 2016 is killing me with object.links Outlook VBA and Custom Forms 2
S how to access the properties of a contact given distlist.member object Outlook VBA and Custom Forms 1
J An attempt operation failed. An object could not be found at line5. Outlook VBA and Custom Forms 2
R How can I retain embedded object with voting button reply? Using Outlook 5
G run-time 438: object doesn't support this property or method Using Outlook 2
B Task List in To-Do Bar 'The operation failed. An object could not be found' Using Outlook 3
A vb6 run time error 5 when Outlook 2007 Explorer object displayed Outlook VBA and Custom Forms 1
P Problem with a Search-Object resulting from an AdvancedSearch Outlook VBA and Custom Forms 2
M MailItem object has no property for when a reply was sent Outlook VBA and Custom Forms 3
T Complete the object model Outlook Wishlist 0
M Outlook Contact Object: Is there a "last accessed" date-time prope Outlook VBA and Custom Forms 3
M Cannot Send - "Operation failed. An object cannot be found" BCM (Business Contact Manager) 4
K How to disconnect Application.COMAddIns.Item().Object? Outlook VBA and Custom Forms 4
S RDOMail object is not working in different thread. Outlook VBA and Custom Forms 13
G Error in Outlook Object Model with redemption and google apps prem Outlook VBA and Custom Forms 3
C Unable to cast object of type 'System.Int32' to type 'System.Byte[ BCM (Business Contact Manager) 1
S UserProperties of MailItem object. Outlook VBA and Custom Forms 3
P UserProperty of mail object problem while dealing with custom fold Outlook VBA and Custom Forms 2

Similar threads

Top