View Single Post
  #3  
Old May 27th 09, 03:21 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default How to judge what folder the specified entry id is?

Hi, ken, that's not exactly what i want, DefaultItemType is only show me what
kind of item the folder will hold, MailItem, appointment, contact. I want to
set the CTreeCtrl item's icon, and this item is a MAPIFolder, so i want to
know it's kind, the kind include "inbox, outbox, sent items, deleted items,
junk e-mails, drafts."
My method not work because the string is not always the same language, my
local system(XP pro) is Chinese system, but my hotmail account registered
using English info. So the folder names are all in a muddle. Some are
English and others are Chinese. This is special case, normally all message
store folders in my outlook are Chinese.

Ken Slovak - [MVP - Outlook] wrote:
GetDefaultFolder will only work with certain folders in your default mail
store (where emails are delivered). I'm not familiar at all with the Outlook
connector, but if it shows folders in Outlook it most likely is mimicking a
PST file. In that case you can iterate the Stores collection in Outlook 2007
or NameSpace.Folders in earlier versions to get all opened stores. From
there you can get folders and each folder is a MAPIFolder, where you can
check on the DefaultItemType property to see what type of folder it is.

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

[quoted text clipped - 17 lines]
"outbox".
Any ideas? If i want to check the folder's(MAPIFolder) type?


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

Ads