![]() |
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 |
#9
|
|||
|
|||
![]() "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 ... 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; CComPtrIUnknown activeUnk; activeIn-QueryInterface(IID_IUnknown, (void**)&activeUnk); struct Outlook::_Inspector* inspector; CComPtrIUnknown 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 } } ........ |
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 |