I'm building an outlook control for an application, and am populating a treelist by recursively adding child folders. These folders are declared as Outlook.MAPIFolder. But the application only allows import from actual emails, so I want to exclude folders containing calendar items. I can right click on those folders in outlook, go to properties, and see type as "Folder containing Calendar Items". But I don't seem to be able to get at that programmatically in VB.Net. Am I missing something simple?
Asked
Active
Viewed 3,557 times
2 Answers
3
If you only want mail folders just check whether the folder's DefaultItemType
property is olMailItem
or olPostItem
.
DefaultItemType
:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mapifolder.defaultitemtype.aspx
OlItemType
Enumeration:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.olitemtype.aspx

Oliver Giesen
- 9,129
- 6
- 46
- 82
2
The MessageClass on the object will tell what type of object you are dealing with. The MessageClass also determines which folder the object will live in and what form will be displayed to render it.
Here is a reference:
http://msdn.microsoft.com/en-us/library/aa171490(office.11).aspx
HTH

Siddharth Rout
- 147,039
- 17
- 206
- 250

Colby Africa
- 1,356
- 9
- 13