MAPIFolderPtr olItemType
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi I am reading all the emails and having problem identifying the type of the email. I use MAPIFolderPtr and browse all the email items. I used UnManaged C++ MAPIFolderPtr MFolder _ItemsPtr mItems; _MailItemPtr mItem; _AppointmentItemPtr aptItem; ..... ..... mItems = MFolder->Items; for(int index=1;indexCount;index++) { if (MFolder->DefaultItemType == olMailItem) { mItem = mItems->Item(x); .... } else if (MFolder->DefaultItemType == olAppointmentItem) { aptItem = mItems->Item(x); ... } .... } However MFolder->DefaultItemType is always returning olMailItem. I also used MFolder->DefaultMessageClass(), etc. but Dont' know how to find out what type of item it is. How can I find out itemType so I can get the right mail item? Thanks.