A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

New Inspector event in OL2000 when using Word as Editor



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old January 12th 08, 02:14 PM posted to microsoft.public.outlook.program_addins
xwjbs
external usenet poster
 
Posts: 7
Default New Inspector event in OL2000 when using Word as Editor

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
...
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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 11:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.