![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 ... 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 a 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 |
#2
|
|||
|
|||
![]()
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 news ![]() 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003 and Word as email editor - newly created emails appear under 'Word' on taskbar | KingCronos | Outlook - General Queries | 1 | October 23rd 07 09:31 PM |
C# and New Inspector event | bstrum | Add-ins for Outlook | 10 | June 12th 07 07:30 PM |
c++ and New Inspector event | JahMic | Add-ins for Outlook | 2 | March 21st 07 02:25 PM |
Word editor does not fire Shutdown event | toni santa | Outlook and VBA | 1 | February 2nd 07 07:28 PM |
Use 3rd Party Editor in Outlook not Word or Built in Editor | Charles | Outlook - Installation | 1 | March 28th 06 03:32 PM |