msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Inspector event in OL2000 when using Word as Editor

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Programs Add-Ins
Author Message
Jim



Joined: 20 Dec 2007
Posts: 2

PostPosted: Wed Jan 02, 2008 11:11 am    Post subject: New Inspector event in OL2000 when using Word as Editor Reply with quote

Hi,

We're working on an OL2000 COM addin that adds menu to New Mail
window. Based on online literature, we should handle the New Inpsector
event, however we found this event will not fire when using Word as
email editor. We found the following KB which confirms the behavior:
http://support.microsoft.com/kb/218298/en-us

My questions are:
1. Is this behavior still true for OL2000 SP3 and there is no way to
get the New Inspector event in OL2000 as long as Word is used as
editor?
2. If so, what is the recommended workaround for this behavior?
3. There are some suggestions on using a Word addin to handle this
case, are there examples on using Word addin together with Outlook?
4. If we do use Word addin, do we use Word object model? If we do use
Word object model, how does it handle mail aspect of the document, for
example subject/attachment?

Thanks

Jim

Archived from group: microsoft>public>outlook>program_addins
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Wed Jan 02, 2008 2:45 pm    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

No level of Outlook 2000 fires NewInspector() when a WordMail Inspector is
opened.

I've never been happy with any attempts to use a Word addin to try to handle
WordMail due to how msword.exe is subclassed by Outlook for use in WordMail.

The best workaround I've found is a timer that checks the count of the
Inspectors collection. If an Inspector is extant and not included in your
Inspector wrapper collection then it's either a WordMail object or a Simple
MAPI Inspector (opened using Send To Mail Recipient or a variant of Send
To).

If an Inspector is a Simple MAPI Inspector it will always use the Outlook
editor and not WordMail, so an easy test if you find an unhandled Inspector
in the Inspectors collection is to check and see if Inspector.IsWordMail is
True.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jim" wrote in message @d21g2000prf.googlegroups.com...
> Hi,
>
> We're working on an OL2000 COM addin that adds menu to New Mail
> window. Based on online literature, we should handle the New Inpsector
> event, however we found this event will not fire when using Word as
> email editor. We found the following KB which confirms the behavior:
> http://support.microsoft.com/kb/218298/en-us
>
> My questions are:
> 1. Is this behavior still true for OL2000 SP3 and there is no way to
> get the New Inspector event in OL2000 as long as Word is used as
> editor?
> 2. If so, what is the recommended workaround for this behavior?
> 3. There are some suggestions on using a Word addin to handle this
> case, are there examples on using Word addin together with Outlook?
> 4. If we do use Word addin, do we use Word object model? If we do use
> Word object model, how does it handle mail aspect of the document, for
> example subject/attachment?
>
> Thanks
>
> Jim
Back to top
View user's profile Send private message
Jim



Joined: 20 Dec 2007
Posts: 2

PostPosted: Thu Jan 03, 2008 11:15 pm    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

Hi, Ken:

Thanks for the idea, we're going to give timer a try. I wonder if you
could give some suggestion on:
1. What is the recommended timer interval?
2. Since our goal is to add a menu to New Mail window, I assume once
we find a Word Mail inspector, we'll use an inspector wrapper on it,
right? However, I think the inspector wrapper relies on the activate
event of the inspector to add the menu, if we use a timer, is it
possible that before we have a chance to add the inspector to wrapper,
the activate event is already fired? How do we handle this case?

Thanks

Jim


On Jan 2, 10:45 pm, "Ken Slovak - [MVP - Outlook]"
wrote:
> No level of Outlook 2000 fires NewInspector() when a WordMail Inspector is
> opened.
>
> I've never been happy with any attempts to use a Word addin to try to handle
> WordMail due to how msword.exe is subclassed by Outlook for use in WordMail.
>
> The best workaround I've found is a timer that checks the count of the
> Inspectors collection. If an Inspector is extant and not included in your
> Inspector wrapper collection then it's either a WordMail object or a Simple
> MAPI Inspector (opened using Send To Mail Recipient or a variant of Send
> To).
>
> If an Inspector is a Simple MAPI Inspector it will always use the Outlook
> editor and not WordMail, so an easy test if you find an unhandled Inspector
> in the Inspectors collection is to check and see if Inspector.IsWordMail is
> True.
>
> --
> Ken Slovak
> [MVP - Outlook]http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm
>
> "Jim" wrote in message
>
> @d21g2000prf.googlegroups.com...
>
> > Hi,
>
> > We're working on an OL2000 COM addin that adds menu to New Mail
> > window. Based on online literature, we should handle the New Inpsector
> > event, however we found this event will not fire when using Word as
> > email editor. We found the following KB which confirms the behavior:
> >http://support.microsoft.com/kb/218298/en-us
>
> > My questions are:
> > 1. Is this behavior still true for OL2000 SP3 and there is no way to
> > get the New Inspector event in OL2000 as long as Word is used as
> > editor?
> > 2. If so, what is the recommended workaround for this behavior?
> > 3. There are some suggestions on using a Word addin to handle this
> > case, are there examples on using Word addin together with Outlook?
> > 4. If we do use Word addin, do we use Word object model? If we do use
> > Word object model, how does it handle mail aspect of the document, for
> > example subject/attachment?
>
> > Thanks
>
> > Jim
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Fri Jan 04, 2008 3:08 pm    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

Use whatever timer interval you want. Too short an interval and you will bog
down your code and Outlook with checking for unhandled Inspectors. Too long
and it will show an appreciable delay in when the UI is shown after the
Inspector is opened. Usually somewhere between 10 and 45 seconds is OK, but
you have to evaluate that yourself.

You'll also need to handle cases where your timer fires before or during
NewInspector for non-WordMail Inspectors and make sure you don't replicate
your Inspector class wrapper in the wrapper collection.

You can't rely on the first Activate with this method necessarily, or even
any Activate event firing at all initially (unless the user moves away from
the Inspector and back again to put focus on the Inspector window). I do
that using Win32 API functions.

I use FindWindow() to get the Outlook main window, set focus to that and
then set focus to the Inspector window to guarantee an Activate event.

I first use FindWindow("mspim_wnd32", "Microsoft Outlook") to get the HWND
of the Outlook window and the Inspector caption with the class "OpusApp" to
get the HWND of the Inspector window. Then I use SetActiveWindow() to shift
focus to Outlook and use SetActiveWindow() again to move focus back to the
Inspector window.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jim" wrote in message @e6g2000prf.googlegroups.com...
Hi, Ken:

Thanks for the idea, we're going to give timer a try. I wonder if you
could give some suggestion on:
1. What is the recommended timer interval?
2. Since our goal is to add a menu to New Mail window, I assume once
we find a Word Mail inspector, we'll use an inspector wrapper on it,
right? However, I think the inspector wrapper relies on the activate
event of the inspector to add the menu, if we use a timer, is it
possible that before we have a chance to add the inspector to wrapper,
the activate event is already fired? How do we handle this case?

Thanks

Jim
Back to top
View user's profile Send private message
xwjbs



Joined: 05 Jan 2008
Posts: 4

PostPosted: Sun Jan 06, 2008 12:54 am    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

I tried it . But i can't compare two inspector objects. So i really replicate
it! Would you like to tell me how to compare them? Here is my code! It's
putted in a single thread ,not the main thread! I use sleep() so that it
works like a timer ! And i also try to use settimer(),but i can't compare two
objects either!

.......
struct Outlook::_Inspector* activeIn;
m_spApp->ActiveInspector(&activeIn);
if(NULL == activeIn)
continue;
CComPtr activeUnk;
activeIn->QueryInterface(IID_IUnknown, (void**)&activeUnk);


struct Outlook::_Inspector* inspector;
CComPtr spInspectUnk;
//IUnknown* spInspectUnk;

///*
for(long i=1;i<=nNowNum;i++)
{
inspectors->Item(CComVariant(i),&inspector);

if(NULL == inspector || 0xcccccccc == (long)inspector)
continue;

inspector->IsWordMail(&bWordMail);
if(!bWordMail)
continue;

inspector->QueryInterface(IID_IUnknown, (void**)&spInspectUnk);

if(spInspectUnk.IsEqualObject(activeUnk))
{
//dosomething
//how to come in this block
}
}
.........


"Ken Slovak - [MVP - Outlook]" wrote:

> Use whatever timer interval you want. Too short an interval and you will bog
> down your code and Outlook with checking for unhandled Inspectors. Too long
> and it will show an appreciable delay in when the UI is shown after the
> Inspector is opened. Usually somewhere between 10 and 45 seconds is OK, but
> you have to evaluate that yourself.
>
> You'll also need to handle cases where your timer fires before or during
> NewInspector for non-WordMail Inspectors and make sure you don't replicate
> your Inspector class wrapper in the wrapper collection.
>
> You can't rely on the first Activate with this method necessarily, or even
> any Activate event firing at all initially (unless the user moves away from
> the Inspector and back again to put focus on the Inspector window). I do
> that using Win32 API functions.
>
> I use FindWindow() to get the Outlook main window, set focus to that and
> then set focus to the Inspector window to guarantee an Activate event.
>
> I first use FindWindow("mspim_wnd32", "Microsoft Outlook") to get the HWND
> of the Outlook window and the Inspector caption with the class "OpusApp" to
> get the HWND of the Inspector window. Then I use SetActiveWindow() to shift
> focus to Outlook and use SetActiveWindow() again to move focus back to the
> Inspector window.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Jim" wrote in message
> @e6g2000prf.googlegroups.com...
> Hi, Ken:
>
> Thanks for the idea, we're going to give timer a try. I wonder if you
> could give some suggestion on:
> 1. What is the recommended timer interval?
> 2. Since our goal is to add a menu to New Mail window, I assume once
> we find a Word Mail inspector, we'll use an inspector wrapper on it,
> right? However, I think the inspector wrapper relies on the activate
> event of the inspector to add the menu, if we use a timer, is it
> possible that before we have a chance to add the inspector to wrapper,
> the activate event is already fired? How do we handle this case?
>
> Thanks
>
> Jim
>
>
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Sun Jan 06, 2008 10:19 pm    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

Outlook 2007 implements the interface needed to be able to compare
Inspectors directly. Prior to that the only way really is to compare
properties on the 2 Inspectors. I use the window location and size, window
caption, and the EntryID of the item in the Inspector (null on unsaved
items). For checking WordMail I would use Inspector.CurrentItem.IsWordMail.

If you are running an Outlook COM addin you are running in-process with
Outlook and shouldn't use Sleep() and all Outlook references should run on
the main thread.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"xwjbs" wrote in message @microsoft.com...
>I tried it . But i can't compare two inspector objects. So i really
>replicate
> it! Would you like to tell me how to compare them? Here is my code! It's
> putted in a single thread ,not the main thread! I use sleep() so that it
> works like a timer ! And i also try to use settimer(),but i can't compare
> two
> objects either!
>
> ......
> struct Outlook::_Inspector* activeIn;
> m_spApp->ActiveInspector(&activeIn);
> if(NULL == activeIn)
> continue;
> CComPtr activeUnk;
> activeIn->QueryInterface(IID_IUnknown, (void**)&activeUnk);
>
>
> struct Outlook::_Inspector* inspector;
> CComPtr spInspectUnk;
> //IUnknown* spInspectUnk;
>
> ///*
> for(long i=1;i<=nNowNum;i++)
> {
> inspectors->Item(CComVariant(i),&inspector);
>
> if(NULL == inspector || 0xcccccccc == (long)inspector)
> continue;
>
> inspector->IsWordMail(&bWordMail);
> if(!bWordMail)
> continue;
>
> inspector->QueryInterface(IID_IUnknown, (void**)&spInspectUnk);
>
> if(spInspectUnk.IsEqualObject(activeUnk))
> {
> //dosomething
> //how to come in this block
> }
> }
> ........
Back to top
View user's profile Send private message
xwjbs



Joined: 05 Jan 2008
Posts: 4

PostPosted: Sat Jan 12, 2008 11:14 am    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

I use a timer to check the count of the inspector in the inspector collection
.. But i find that the count is always 0 in ol2000. Here is my code.

void __stdcall TimerFunc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
..........
struct Outlook::_Inspectors* inspectors;
pClass->m_spApp->get_Inspectors(&inspectors);
if(NULL == inspectors)
return;

inspectors->get_Count(&nNowNum);

struct Outlook::_Inspector* inspector;

for(int i=1;i<=nNowNum;i++)
{
inspectors->Item(CComVariant(i),&inspector);

if(NULL == inspector || 0xcccccccc == (long)inspector)
continue;

.......

}

......
}

Since the count is 0,i can't ge any inspector. Thankyou!

"Ken Slovak - [MVP - Outlook]" wrote:

> Outlook 2007 implements the interface needed to be able to compare
> Inspectors directly. Prior to that the only way really is to compare
> properties on the 2 Inspectors. I use the window location and size, window
> caption, and the EntryID of the item in the Inspector (null on unsaved
> items). For checking WordMail I would use Inspector.CurrentItem.IsWordMail.
>
> If you are running an Outlook COM addin you are running in-process with
> Outlook and shouldn't use Sleep() and all Outlook references should run on
> the main thread.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "xwjbs" wrote in message
> @microsoft.com...
> >I tried it . But i can't compare two inspector objects. So i really
> >replicate
> > it! Would you like to tell me how to compare them? Here is my code! It's
> > putted in a single thread ,not the main thread! I use sleep() so that it
> > works like a timer ! And i also try to use settimer(),but i can't compare
> > two
> > objects either!
> >
> > ......
> > struct Outlook::_Inspector* activeIn;
> > m_spApp->ActiveInspector(&activeIn);
> > if(NULL == activeIn)
> > continue;
> > CComPtr activeUnk;
> > activeIn->QueryInterface(IID_IUnknown, (void**)&activeUnk);
> >
> >
> > struct Outlook::_Inspector* inspector;
> > CComPtr spInspectUnk;
> > //IUnknown* spInspectUnk;
> >
> > ///*
> > for(long i=1;i<=nNowNum;i++)
> > {
> > inspectors->Item(CComVariant(i),&inspector);
> >
> > if(NULL == inspector || 0xcccccccc == (long)inspector)
> > continue;
> >
> > inspector->IsWordMail(&bWordMail);
> > if(!bWordMail)
> > continue;
> >
> > inspector->QueryInterface(IID_IUnknown, (void**)&spInspectUnk);
> >
> > if(spInspectUnk.IsEqualObject(activeUnk))
> > {
> > //dosomething
> > //how to come in this block
> > }
> > }
> > ........
>
>
Back to top
View user's profile Send private message
xwjbs



Joined: 05 Jan 2008
Posts: 4

PostPosted: Sat Jan 12, 2008 11:16 am    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

"Ken Slovak - [MVP - Outlook]" wrote:

> Outlook 2007 implements the interface needed to be able to compare
> Inspectors directly. Prior to that the only way really is to compare
> properties on the 2 Inspectors. I use the window location and size, window
> caption, and the EntryID of the item in the Inspector (null on unsaved
> items). For checking WordMail I would use Inspector.CurrentItem.IsWordMail.
>
> If you are running an Outlook COM addin you are running in-process with
> Outlook and shouldn't use Sleep() and all Outlook references should run on
> the main thread.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "xwjbs" wrote in message
> @microsoft.com...
> >I tried it . But i can't compare two inspector objects. So i really
> >replicate
> > it! Would you like to tell me how to compare them? Here is my code! It's
> > putted in a single thread ,not the main thread! I use sleep() so that it
> > works like a timer ! And i also try to use settimer(),but i can't compare
> > two
> > objects either!
> >
> > ......
> > struct Outlook::_Inspector* activeIn;
> > m_spApp->ActiveInspector(&activeIn);
> > if(NULL == activeIn)
> > continue;
> > CComPtr activeUnk;
> > activeIn->QueryInterface(IID_IUnknown, (void**)&activeUnk);
> >
> >
> > struct Outlook::_Inspector* inspector;
> > CComPtr spInspectUnk;
> > //IUnknown* spInspectUnk;
> >
> > ///*
> > for(long i=1;i<=nNowNum;i++)
> > {
> > inspectors->Item(CComVariant(i),&inspector);
> >
> > if(NULL == inspector || 0xcccccccc == (long)inspector)
> > continue;
> >
> > inspector->IsWordMail(&bWordMail);
> > if(!bWordMail)
> > continue;
> >
> > inspector->QueryInterface(IID_IUnknown, (void**)&spInspectUnk);
> >
> > if(spInspectUnk.IsEqualObject(activeUnk))
> > {
> > //dosomething
> > //how to come in this block
> > }
> > }
> > ........
>
>
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Sat Jan 12, 2008 6:33 pm    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

I've always seen the Count advance with WordMail.

What mode of Outlook 2000 are you using? Look in Help, About. It's possible
that Internet only mode doesn't increment Inspectors.Count with WordMail.
It's been so long since I tested with that mode that I don't recall.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"xwjbs" wrote in message @microsoft.com...
>I use a timer to check the count of the inspector in the inspector
>collection
> . But i find that the count is always 0 in ol2000. Here is my code.
Back to top
View user's profile Send private message
xwjbs



Joined: 05 Jan 2008
Posts: 4

PostPosted: Thu Feb 14, 2008 12:02 am    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

Heloo ken! There is another strange problem. I can't catch the invoke event
When I use "Send To Mail Recipient" . So I use a timer to check the count and
items of inspectors. It works fine. But when I close this window, it closed
but another window with all menus grayed exists and the outlook.exe process
doesn't exit. The follow is my code


if (idEvent != g_pAddIn->m_timerol2000)
return; ///*
CSecurityAddin* pClass=g_pAddIn;
VARIANT_BOOL bWordMail=false;

//static bActive = false;

struct Outlook::_Inspectors* pInspectors;
pClass->m_spApp->get_Inspectors(&pInspectors);
if(NULL == pInspectors)
return;

struct Outlook::_Inspector* pInspector;
long nIns=0;
pInspectors->get_Count(&nIns);
if(nIns<=0)
return;

if(g_bAdd)
return;
for(int i=1;i<=nIns;i++)
{
CComVariant vItem(i);
pInspectors->Item(vItem,&pInspector);
if(NULL != pInspector)// && !bActive)
{

#ifdef FIRSTDEBUG
fprintf(g_Log,"active!%d\n",i);
fflush(g_Log);
#endif
CInspectorWrapper* tmp = new CInspectorWrapper(pClass->m_spApp,pInspector);
tmp->attchMenu();
pClass->m_spInspectorNow.push_back(tmp);
g_bAdd = true;

}
}

I change it to thread but i can't resolve it either! I find that when i use
"pInspectors->Item(vItem,&pInspector);",this problem will occur. why? Thank
you very much


"Ken Slovak - [MVP - Outlook]" wrote:

> No level of Outlook 2000 fires NewInspector() when a WordMail Inspector is
> opened.
>
> I've never been happy with any attempts to use a Word addin to try to handle
> WordMail due to how msword.exe is subclassed by Outlook for use in WordMail.
>
> The best workaround I've found is a timer that checks the count of the
> Inspectors collection. If an Inspector is extant and not included in your
> Inspector wrapper collection then it's either a WordMail object or a Simple
> MAPI Inspector (opened using Send To Mail Recipient or a variant of Send
> To).
>
> If an Inspector is a Simple MAPI Inspector it will always use the Outlook
> editor and not WordMail, so an easy test if you find an unhandled Inspector
> in the Inspectors collection is to check and see if Inspector.IsWordMail is
> True.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Jim" wrote in message
> @d21g2000prf.googlegroups.com...
> > Hi,
> >
> > We're working on an OL2000 COM addin that adds menu to New Mail
> > window. Based on online literature, we should handle the New Inpsector
> > event, however we found this event will not fire when using Word as
> > email editor. We found the following KB which confirms the behavior:
> > http://support.microsoft.com/kb/218298/en-us
> >
> > My questions are:
> > 1. Is this behavior still true for OL2000 SP3 and there is no way to
> > get the New Inspector event in OL2000 as long as Word is used as
> > editor?
> > 2. If so, what is the recommended workaround for this behavior?
> > 3. There are some suggestions on using a Word addin to handle this
> > case, are there examples on using Word addin together with Outlook?
> > 4. If we do use Word addin, do we use Word object model? If we do use
> > Word object model, how does it handle mail aspect of the document, for
> > example subject/attachment?
> >
> > Thanks
> >
> > Jim
>
>
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Thu Feb 14, 2008 2:58 pm    Post subject: Re: New Inspector event in OL2000 when using Word as Editor Reply with quote

Are you releasing your Inspector wrapper class and any Inspector and item
objects when the Simple MAPI Inspector closes? What you are seeing sounds
like the "ghost" Inspector problem. That's a blank Inspector window that
cannot be closed using code but if the user clicks on the Close box in the
Inspector window the window does close. That happens with any modal
Inspector window (Simple MAPI Inspectors are opened modally) if you aren't
real careful to handle both the Inspector and item Close() events and don't
release all of your related objects in a timely fashion.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"xwjbs" wrote in message @microsoft.com...
> Heloo ken! There is another strange problem. I can't catch the invoke
> event
> When I use "Send To Mail Recipient" . So I use a timer to check the count
> and
> items of inspectors. It works fine. But when I close this window, it
> closed
> but another window with all menus grayed exists and the outlook.exe
> process
> doesn't exit. The follow is my code
>
>
> if (idEvent != g_pAddIn->m_timerol2000)
> return; ///*
> CSecurityAddin* pClass=g_pAddIn;
> VARIANT_BOOL bWordMail=false;
>
> //static bActive = false;
>
> struct Outlook::_Inspectors* pInspectors;
> pClass->m_spApp->get_Inspectors(&pInspectors);
> if(NULL == pInspectors)
> return;
>
> struct Outlook::_Inspector* pInspector;
> long nIns=0;
> pInspectors->get_Count(&nIns);
> if(nIns<=0)
> return;
>
> if(g_bAdd)
> return;
> for(int i=1;i<=nIns;i++)
> {
> CComVariant vItem(i);
> pInspectors->Item(vItem,&pInspector);
> if(NULL != pInspector)// && !bActive)
> {
>
> #ifdef FIRSTDEBUG
> fprintf(g_Log,"active!%d\n",i);
> fflush(g_Log);
> #endif
> CInspectorWrapper* tmp = new
> CInspectorWrapper(pClass->m_spApp,pInspector);
> tmp->attchMenu();
> pClass->m_spInspectorNow.push_back(tmp);
> g_bAdd = true;
>
> }
> }
>
> I change it to thread but i can't resolve it either! I find that when i
> use
> "pInspectors->Item(vItem,&pInspector);",this problem will occur. why?
> Thank
> you very much

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
OL2000 'Illegal instruction' after adding menu to ActiveMenu This one really puzzles me. I'm developing an Outlook COM Add-in, C++/ATL, which is to work under Outlook 2k - 2k7. I've simplified the code and isolated the problem in a default VS2005 Extensibility project, of which below you can find the code from the

Inspector Wrapper Hi, I used MicroEye example and Ken's to create Outlook 2003 add-in. This add-in adds a new CommandBar with a dropdown and command button to the outlook toolbar. Everything is fine if I open multiple emails from Inbox. I see exactly one c

How to catch the click event of ASPX page in Outlook Hi, My requirement is to refresh the folder structure in the Outlook on click of a button on a ASPX form. The webpage is at the web server and displayed within the outlook trough a compatible outlook Add-in. Is it possible to catch the Button click event

Inspector.Activate event under VS2005 C#? Hey All, I was wondering if anyone knows how or happens to have a snippet of code demonstrating how to hook into the event under Visual Studio 2005 using C#? This event does not appear under the obvious object model and I'm unsure how t

Problem using Word as editor...? Howdy, I use OL2000 and use Word as my email editor (Yes, I know that many suggest otherwise, but there are features in Word that I need...) Recently, when I respond to a message, Word fails to open. Specifically, my CPU usage goes to 100%, and everything
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Programs Add-Ins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group