Bad Outlook Programming Model: Cached Exchange Mode Limitations

Cached Items in Outlook

When “Cached Exchange Mode” is enabled, items which have been cached locally will have some unexpected behaviour. This feature allows one to work with your personal folders, as well as selected public folder contents even when they’re disconnected from the Exchange Server.

However, once that feature is enabled, if you attempt to access the Parent.FolderPath property, you will be returned an inaccurate folder path. To see this bug in action, select an item in a subfolder of the folder which you have added to Favorites. Now press Alt+F11 to bring up the Visual Basic editor, followed by Ctrl+G to bring up the Immediate window.

Application.ActiveExplorer.Selection(1).Parent.FolderPath

This will return

'\\Public Folders\Favorites\ImmediateParentFolder'

One would assume it would return

'\\Public Folders\Favorites\ParentFolder\ImmediateParentFolder'

but that’s not the case. If you disable “Download Public Folder Favorites”, then the above code would return the correct canonical path of the folder.

'\\Public Folders\All Public Folders\ParentFolder\ImmediateParentFolder'

In our product SSW eXtremeEmails!, it prevents the Incident screen from obtaining a valid URL for the email item.

Figure: CDO object model failed to retrieve Outlook Web Access URL

Figure: CDO object model failed to retrieve Outlook Web Access URL

As a work around, the “Download Public Folder Favorites” settings should be disabled. If you wish to see correct URLs in your personal folders, “Cached Exchanged Mode” must be disabled all together.

 Figure: Disabling Cached Exchange Mode as a work around to invalid item properties


Figure: Disabling Cached Exchange Mode as a work around to invalid item properties

I hope this would be fixed in the next version of Outlook. Items in folders added to Favorites should provide the canonical path to aid Outlook ‘smart client’ plug-ins with Offline functionality, even when “Download Public Folder Favorites” is enabled.