How to get active inspector window handle?

Status
Not open for further replies.
M

madhavi

Hi,

I am trying to get the inspector window handle as I need to add one or two components (like button etc) to the inspector. I used the below code and I am getting the active window of outlook is correct. But the handle I am getting is not correct when I examined it with spy++.

What could be wrong in this?

Also if I have more than one mail opened with same title, How can we get the handle of the actually the currently active inspector window? (As to find the handle, we are just passsing the tile and two or more windows have the same title)

Please provide me some help to resolve this problem.

Thanks in advance.
 
K

Ken Slovak - [MVP - Outlook]

I have no idea what code you're referring to, since you never showed in

either of your duplicate posts. Get the handle when the Inspector opens, in

the first Activate() event. At that time the Inspector will be the

ActiveInspector.

"madhavi" <madhavi_krishna[at]yahoo[dot]com> wrote in message

news:u18gNXwSKHA.220@TK2MSFTNGP02.phx.gbl...
> Hi,

> I am trying to get the inspector window handle as I need to add one or two
> components (like button etc) to the inspector. I used the below code and I
> am getting the active window of outlook is correct. But the handle I am
> getting is not correct when I examined it with spy++.

> What could be wrong in this?

> Also if I have more than one mail opened with same title, How can we get
> the handle of the actually the currently active inspector window? (As to
> find the handle, we are just passsing the tile and two or more windows
> have the same title)

> Please provide me some help to resolve this problem.
> Thanks in advance.
 

madhavi

Member
I am using findwindow method to find the handle of the active inspector window. But my doubt is if we have two three inspector windows with same caption, as I am supplying classname and caption to the findwindow method, will I get the handle of active inspector.




Because for testing purpose I sent mails with same subject and body, so multiple inspectors can have same window class and caption.




Earlier I forgot to mention this.


Thank you for looking into this. Please let me know whether I am doing correctly or not.






I have no idea what code you're referring to, since you never showed in


either of your duplicate posts. Get the handle when the Inspector opens, in


the first Activate() event. At that time the Inspector will be the


ActiveInspector.




--


















"madhavi" <madhavi_krishna[at]yahoo[dot]com> wrote in message


news:u18gNXwSKHA.220@TK2MSFTNGP02.phx.gbl...

> Hi,

>

> I am trying to get the inspector window handle as I need to add one or two

> components (like button etc) to the inspector. I used the below code and I

> am getting the active window of outlook is correct. But the handle I am

> getting is not correct when I examined it with spy++.

>

> What could be wrong in this?

>

> Also if I have more than one mail opened with same title, How can we get

> the handle of the actually the currently active inspector window? (As to

> find the handle, we are just passsing the tile and two or more windows

> have the same title)

>

> Please provide me some help to resolve this problem.

> Thanks in advance.
 
K

Ken Slovak - [MVP - Outlook]

If you have multiple Inspectors that have the same class name and caption

then FindWindow() could retrieve any of them.

In that case you might want to use FindWindowEx() and test each found window

for size and location on the screen to figure out which is which.

Of course that test case is an edge case, it's not likely in the real world

that a user would have multiple Inspectors opened at the same time all with

the same caption.

"madhavi" <madhavi.4002py@invalid> wrote in message

news:madhavi.4002py@invalid...

> I am using findwindow method to find the handle of the active inspector
> window. But my doubt is if we have two three inspector windows with same
> caption, as I am supplying classname and caption to the findwindow
> method, will I get the handle of active inspector.

> Because for testing purpose I sent mails with same subject and body, so
> multiple inspectors can have same window class and caption.

> Earlier I forgot to mention this.
> Thank you for looking into this. Please let me know whether I am doing
> correctly or not.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A active inspector in memory Outlook VBA and Custom Forms 1
A disable a menu in active inspector Outlook VBA and Custom Forms 1
P Automate Outlook Start - No Active Explorer Object Found Using Outlook 10
S Active Directory Management Tools for Administrators Using Outlook 0
G Problems with Active Directory Rights Management Services (AD RMS) in Outlook 2013 Exchange Server Administration 0
Diane Poremsky Import Images into the Active Directory Using Outlook 0
S How to send an OUTLOOK task to a contact out of my active directory? Using Outlook 2
E Outlook rule only active certain times of day Using Outlook 6
R HELP!!! Email template with active excel spreadsheet Using Outlook 1
C active/passive broadband connections to maintain various IT services Exchange Server Administration 2
R Went from outlook 2003 to 2010 - can't retrieve active for contacts Using Outlook 0
C Active Directory does not exist or cannot be contacted Exchange Server Administration 12
A Active task for selected days options Outlook Wishlist 1
T Exchange 2010 servers can't communicate with Active Directory Exchange Server Administration 4
L VBA Processing of Active E-Mail Message Outlook VBA and Custom Forms 2
A Active explorer issue Outlook VBA and Custom Forms 15
M Bring back Active tasks for selected days Outlook Wishlist 1
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
T How to get Inspector object from Window handle Outlook VBA and Custom Forms 2
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
B How to get the path from an outlook.Inspector Outlook VBA and Custom Forms 4
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
N Item cannot be saved because it was modified by another user or window, and, Item could not be moved... Using Outlook 0
A OutLook For Mac 16.46 Comes Up In Small Window When Opening Using Outlook 4
A How to stop user form from disapearing once mail window is closed? Outlook VBA and Custom Forms 0
J Are the underlined letters in Outlook Reminders window supposed to work? Using Outlook 4
M Where is the setting to *turn off* open calendar in a new window? Using Outlook 3
M Outlook email window maximizes improperly Using Outlook 3
T Change the selected Message in the Outlook window Outlook VBA and Custom Forms 2
P Reminders Window stops being displayed, even with /resetfolders or /cleanreminders Using Outlook 8
D Outlook Message Window Changes Size and Position Using Outlook 1
U Catching ModuleSwitch events after "open in new window" Outlook VBA and Custom Forms 2

Similar threads

Top