2

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?

2 Answers 2

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.