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?
+1
A:
Hello,
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
Colby Africa
Colby Africa
2008-12-22 17:45:52
+1
A:
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
2008-12-22 21:43:57