We had a user contact us yesterday who had deleted a public folder that contained a large number of subfolders and items. This is not usually too much of a drama, we have a 14 day deleted items retention period on our public folder stores, so its usually just a case of adding the DumpsterAlwaysOn key to the registry on the client, browsing to the parent public folder, clicking on Tools, then Recover Deleted Items and selecting the folder to recover. This time however, we received the following message when attempting to recover the folder:
“Outlook was unable to recover some or all of the items in this folder. Make sure you have the required permissions to recover items in this folder, and try again. If the problem persists, contact your administrator.”
Naturally, we checked the permissions; in fact we tried to use the Exchange service account mailbox to recover the folder but received the same error. We also tried temporarily disabling Trend ScanMail (our Exchange level antivirus) in case it was interfering with the recovery process. The folder would actually appear in Outlook temporailly before it produced the error, at which point it would disappear again.
We did a lot of searching around to find a solution; most forums and articles that we came across either suggested to check permissions and disable the antivirus like we had done or use isinteg to repair the database (which I’m not such a fan of). Others suggested that it wasn’t possible to recover the folder at all. After some more searching I came across a tool called MFCMapi.
Once I downloaded MFCMapi, I was able to browse the folders that had been deleted. I tried to recover the folder that the user had deleted, but it produced an error. However, because I was able to browse the sub folders, I attempted to recover one of the them and it was successful. I tried several folders, some were successful and others were not. I figured if we could get some of the contents back it would be better than nothing. It appeared that some of the contents were corrupted, which would explain was why Outlook was unable to recover the folder. Outlook doesn’t provide the option to recover the sub folders, and this is where MFCMapi really helped. I was able to restore the majority of sub folders with 5 or 6 of them not wanting co-operate.
You can download MFCMapi from here.
Once downloaded and extracted, run MFCMapi.exe and close the welcome window. To browse deleted public folders do the following:
1. Click on the Session menu and click on Logon and Display Store tables. You’ll see that it uses Outlook to connect to the stores, select your Outlook profile and click on OK

2. Click on the MDB menu and select Open Public Folder store. Tick the Use Admin Privilegesbox and click on OK.

3. Expand Public Root and IPM_SUBTREE. You’ll then see the public folders that you would normally see under “All Public Folders” in Outlook.

4. Navigate through the public folder tree until you get to the parent folder of the folder that you are trying to restore.
5. Right click on the parent folder and select Open Deleted Sub Folder Table. A new window will open displaying the deleted subfolders. Right click on the folder and select Restore Deleted Folder. A box will open up that allows you to select to also restore the subfolders, tick that option and click on OK. You may receive an error message stating that the folder couldn’t be restored, much like I did.

If you don’t receive the message then the restore was successful and you should see the public folder and items appear in Outlook. If not, don’t panic just yet, you may be able to restore some (hopefully most) of the subfolders. If this is the case, just navigate through the folder structure and attempt to restore each folder. Unfortunately it doesn’t allow you to select multiple folders using CTRL or SHIFT; I spent a fair bit of time restoring each folder one by one.
Considering that I was able to restore most of the folders and items that had been deleted, I was happy with the result, and so was the user. MFCMapi proved to be a very useful tool and I’m sure there will be times when I’ll need to use it again.