View Single Post
  #5  
Old May 28th 09, 10:24 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to judge what folder the specified entry id is?

The omnly way to do that is to read the MailItem.Parent property which
returns the parent MAPIFolder object.
Or you can read the PR_PARENT_ENTRYID MAPI property.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:96a564faae503@uwe...
I scaned all message store to search folders and add them to a tree with
checkbox. user can select what folder to do deal with, i want to set
different icon to the tree item. I have icon for inbox, outbox, sent items
and so on. So i want to know what kind of MAPIFolder is, for the default
message store, it is esay to know this while use GetDefaultFolder, for
other
message store like hotmail, i tried a way, it worked fine, but when i add
hotmail account via outlook connector(from microsoft), it not work any
more.
My method is:
1. use NameSpace::GetDefaultFolder get the folder.
2. Get name of the default folder and save it to a map.
3. do 1,2 to get other folder string, inbox, outbox(...etc.)
4. for no default message store, check their name if existed in the map,
if
does, return id will show which kind it is.
Hotmail(via outlook connector) is not work, because some string are
english,
such inbox, sent items, some are local language, such as chinese string of
"outbox".
Any ideas? If i want to check the folder's(MAPIFolder) type?

--
Message posted via http://www.officekb.com



Ads