Retrieve special folders that are not “default” outlook

I'm looping through each folder of my outlook store in my code and used to check the folder type by retreiving all default folders and compare their entry ID like the following.

Public Function GetFolderTypeName(objFolder)
 Dim objType, objDefaultFolder

 'dctValidFolders is a dictionary of default folders type
 For Each objType in dctValidFolders
  Set objDefaultFolder = objMAPI.GetDefaultFolder(dctValidFolders.Item(objType))
  If objFolder.EntryID = objDefaultfolder.EntryID Then
    Set objDefaultfolder = Nothing
    GetFolderTypeName = objType
    Exit Function
  End If
 Next
End Function

Now, I'm looping through a mailbox that has more than 1 folder of type contacts. What now?

Is there basically no other way to know the folder type?

Answers


There was in fact, check

folder.DefaultItemType 

This will return an item type , like olMailItem, and depending on that you can "assume" the folder type.


Need Your Help

Looking for “test execution manager” software to manage automated tests

testing hudson automated-tests functional-testing

We develop several products and already have extensive unit-tests and fully automated functional tests for them. Problem is that those tests don't run frequently, just manually by developer or just

How to build a web crawler based on Scrapy to run forever?

python web-crawler scrapy

I want to build a web crawler based on Scrapy to grab news pictures from several news portal website. I want to this crawler to be:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.