PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
ActiveInspector method returns wrong window when MS-Word is used as email editor
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
ActiveInspector method returns wrong window when MS-Word is used as email editor
![]() |
ActiveInspector method returns wrong window when MS-Word is used as email editor |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi All,
I am developing a Outlook add-in through c#.Currently I am facing problem with the ActiveInspector() method. When user opens multiple windows in Outlook and use MS-Word as an Email editor, then the Window returned by this method is wrong one. Can anybody help me out of this, please? Thanks Dattatraya |
|
|
|
#2 |
|
Guest
Posts: n/a
|
I hit this problem too with Outlook XP. My solution is to maintain a flag in
my inspector handler which is set/unset when handling activate/deactivate events - I maintain an array of inspector handlers in my inspectors handler and loop through them asking whether they are active. I am sure there are more sophisticated ways to solve the problem, but this works. Matt Fletcher "Dattatraya Shewale" <datta201@hotmail.com> wrote in message news:18faa01c44c99$3fb91d20$a301280a@phx.gbl... > Hi All, > I am developing a Outlook add-in through c#.Currently I > am facing problem with the ActiveInspector() method. When > user opens multiple windows in Outlook and use MS-Word as > an Email editor, then the Window returned by this method > is wrong one. Can anybody help me out of this, please? > > Thanks > Dattatraya |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hi Matt
Thanks for the reply. I have some queries regarding your solution. 1)Are you talking about writing wrapper class for Inspector and maintain a flag in that class? 2)On activate/deactivate events we doesn't get the reference of the Inspector which is activated/deactivated, so where should I set the flag? Can you elaborate further, please? Any code snippet describing your solution will be appreciated. Thanks once again Dattatraya Shewale >-----Original Message----- >I hit this problem too with Outlook XP. My solution is to maintain a flag in >my inspector handler which is set/unset when handling activate/deactivate >events - I maintain an array of inspector handlers in my inspectors handler >and loop through them asking whether they are active. > >I am sure there are more sophisticated ways to solve the problem, but this >works. > >Matt Fletcher > >"Dattatraya Shewale" <datta201@hotmail.com> wrote in message >news:18faa01c44c99$3fb91d20$a301280a@phx.gbl... >> Hi All, >> I am developing a Outlook add-in through c#.Currently I >> am facing problem with the ActiveInspector() method. When >> user opens multiple windows in Outlook and use MS-Word as >> an Email editor, then the Window returned by this method >> is wrong one. Can anybody help me out of this, please? >> >> Thanks >> Dattatraya > > >. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Hi Matt
Thanks for your solution, I got your point. Thanks one again Dattatraya >-----Original Message----- >Hi Matt > Thanks for the reply. I have some queries >regarding your solution. >1)Are you talking about writing wrapper class for >Inspector and maintain a flag in that class? >2)On activate/deactivate events we doesn't get the >reference of the Inspector which is activated/deactivated, >so where should I set the flag? >Can you elaborate further, please? Any code snippet >describing your solution will be appreciated. > >Thanks once again >Dattatraya Shewale > > > >>-----Original Message----- >>I hit this problem too with Outlook XP. My solution is to >maintain a flag in >>my inspector handler which is set/unset when handling >activate/deactivate >>events - I maintain an array of inspector handlers in my >inspectors handler >>and loop through them asking whether they are active. >> >>I am sure there are more sophisticated ways to solve the >problem, but this >>works. >> >>Matt Fletcher >> >>"Dattatraya Shewale" <datta201@hotmail.com> wrote in >message >>news:18faa01c44c99$3fb91d20$a301280a@phx.gbl... >>> Hi All, >>> I am developing a Outlook add-in through >c#.Currently I >>> am facing problem with the ActiveInspector() method. >When >>> user opens multiple windows in Outlook and use MS-Word >as >>> an Email editor, then the Window returned by this method >>> is wrong one. Can anybody help me out of this, please? >>> >>> Thanks >>> Dattatraya >> >> >>. >> >. > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
1. Yes, we have both a wrapper class (CMailHandler) that wraps an Inspector
object and handles Inspector events, and a separate wrapper class (CInspectorsHandler) that handles Inspectors events (i.e. New Inspector). CInspectorsHandler maintains an array of CMailHandlers corresponding to the Inspectors collection. CMailHandler contains a flag which records whether it is active, and a method to allow public access to the value of this flag. 2. CMailHandler handles InspectorEvents::Activate (0xf001) and InspectorEvents: eactivate (0xf006), setting and unsetting the flag asappropriate - as this event is handled by the instance of the wrapper class wrapping the particular Inspector, there is no need for a reference to the Inspector object. Unfortunately this code is embedded in a fairly substantial application and I don't have time to extract code snippets - and I'm working in C++ rather than C# anyway. HTH Matt Fletcher "Dattatraya Shewale" <datta201@hotmail.com> wrote in message news:1989901c44d3b$f2da2b90$a501280a@phx.gbl... > Hi Matt > Thanks for the reply. I have some queries > regarding your solution. > 1)Are you talking about writing wrapper class for > Inspector and maintain a flag in that class? > 2)On activate/deactivate events we doesn't get the > reference of the Inspector which is activated/deactivated, > so where should I set the flag? > Can you elaborate further, please? Any code snippet > describing your solution will be appreciated. > > Thanks once again > Dattatraya Shewale > > > > >-----Original Message----- > >I hit this problem too with Outlook XP. My solution is to > maintain a flag in > >my inspector handler which is set/unset when handling > activate/deactivate > >events - I maintain an array of inspector handlers in my > inspectors handler > >and loop through them asking whether they are active. > > > >I am sure there are more sophisticated ways to solve the > problem, but this > >works. > > > >Matt Fletcher > > > >"Dattatraya Shewale" <datta201@hotmail.com> wrote in > message > >news:18faa01c44c99$3fb91d20$a301280a@phx.gbl... > >> Hi All, > >> I am developing a Outlook add-in through > c#.Currently I > >> am facing problem with the ActiveInspector() method. > When > >> user opens multiple windows in Outlook and use MS-Word > as > >> an Email editor, then the Window returned by this method > >> is wrong one. Can anybody help me out of this, please? > >> > >> Thanks > >> Dattatraya > > > > > >. > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Hi Matt,
Thanks for your reply. The problem is solved with your solution. Thanks Dattatraya >-----Original Message----- >1. Yes, we have both a wrapper class (CMailHandler) that wraps an Inspector >object and handles Inspector events, and a separate wrapper class >(CInspectorsHandler) that handles Inspectors events (i.e. New Inspector). >CInspectorsHandler maintains an array of CMailHandlers corresponding to the >Inspectors collection. CMailHandler contains a flag which records whether it >is active, and a method to allow public access to the value of this flag. >2. CMailHandler handles InspectorEvents::Activate (0xf001) and >InspectorEvents: eactivate (0xf006), setting andunsetting the flag as >appropriate - as this event is handled by the instance of the wrapper class >wrapping the particular Inspector, there is no need for a reference to the >Inspector object. > >Unfortunately this code is embedded in a fairly substantial application and >I don't have time to extract code snippets - and I'm working in C++ rather >than C# anyway. > >HTH >Matt Fletcher > >"Dattatraya Shewale" <datta201@hotmail.com> wrote in message >news:1989901c44d3b$f2da2b90$a501280a@phx.gbl... >> Hi Matt >> Thanks for the reply. I have some queries >> regarding your solution. >> 1)Are you talking about writing wrapper class for >> Inspector and maintain a flag in that class? >> 2)On activate/deactivate events we doesn't get the >> reference of the Inspector which is activated/deactivated, >> so where should I set the flag? >> Can you elaborate further, please? Any code snippet >> describing your solution will be appreciated. >> >> Thanks once again >> Dattatraya Shewale >> >> >> >> >-----Original Message----- >> >I hit this problem too with Outlook XP. My solution is to >> maintain a flag in >> >my inspector handler which is set/unset when handling >> activate/deactivate >> >events - I maintain an array of inspector handlers in my >> inspectors handler >> >and loop through them asking whether they are active. >> > >> >I am sure there are more sophisticated ways to solve the >> problem, but this >> >works. >> > >> >Matt Fletcher >> > >> >"Dattatraya Shewale" <datta201@hotmail.com> wrote in >> message >> >news:18faa01c44c99$3fb91d20$a301280a@phx.gbl... >> >> Hi All, >> >> I am developing a Outlook add-in through >> c#.Currently I >> >> am facing problem with the ActiveInspector() method. >> When >> >> user opens multiple windows in Outlook and use MS- Word >> as >> >> an Email editor, then the Window returned by this method >> >> is wrong one. Can anybody help me out of this, please? >> >> >> >> Thanks >> >> Dattatraya >> > >> > >> >. >> > > > >. > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

eactivate (0xf006), setting and unsetting the flag as
