Outlook 2010 Update Butchers Shared Folder IDs, Part 2
(Note: This was originally posted June 28th, 2011)
A previous post covered how an update to Outlook 2010 changed the underlying mechanics around shared folders and their entry ID’s, resulting in ID’s that were useless to all MAPI clients, save for Outlook. This presented us with an inability to open up folders via third-party libraries like Redemption.
A solution was proposed that would work in cached mode, however it left us stuck if online mode was being used. By foregoing the use of these entry ID’s entirely, we can get around this problem in both online and cached mode. The solution that allows us to do this is presented in this short article.
Instead of dealing with the bad folder entry ID’s Outlook 2010 gives us, we can skip them all together by using the GetSharedDefaultFolder method offered by a RDOSession instance.
Even though the folder entry ID’s are useless, the store ID’s reported by Outlook are accurate and do work. This is all the information we need in order to use the above method. Here’s some example code (that hasn’t been tested, but should work):
public static RDOFolder OpenSharedCalendar(RDOSession session, string storeId)
{
RDOExchangeMailboxStore store = (RDOExchangeMailboxStore) session.GetStoreFromID(storeId);
RDOAddressEntry owner = store.Owner;
RDOFolder calendar = session.GetSharedDefaultFolder(owner, rdoDefaultFolders.olFolderCalendar);
// Don't forget to clean up here...
return calendar;
}
Any store ID will be fine — if Outlook current has a shared calendar open, you can use the CurrentFolder.StoreID property found on the active Explorer to do the trick.
