View Single Post
  #8  
Old March 10th 09, 04:51 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to specify the "current entry id" to GetItemFromID?

The whole point of retrieving the value of the Class property is to make
sure trhat you really have a MailItem object.
Try the following script in OutlookSpy: click Application button on the
OutlookSpy toolbar, go to the Script tab, paste teh script below. Now
whenever a new message arrives, OutlookSpy will open a new IDispatch browser
where you shoudl be able to see all the object properties.

sub Application_NewMailEx(EntryIDCollection)
set Msg = Application.Session.GetItemfromID(EntryIDCollectio n)
BrowseObject(Msg)
end sub

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:928e607f8eb42@uwe...
No, i don't think so, i'm sure it is a MailItem, because it is my test
e-mail
(It is the case, my outlook have two accounts, A and B, i Use A send an
encrypted e-mail to B, and receive this e-mail, then the plugin will enter
OnNewMailEx(BSTR entryId) function.).

I got it, i can use GetIDsOfNames to get a class property of this income
item,
but i can't get MailItem, am i right?

Dmitry Streblechenko wrote:
That means the message is not a MailItem. Could be ReportItem,
MeetingItem,
etc.
The first parameter in GetIDsOfNames is the name of the property, e.g.
"Class".

The result of run script is: The MailItem property page is shown. I have
no

[quoted text clipped - 50 lines]
the
_MailItemPtr even it is encrypted Mail item??


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200903/1



Ads