I am able to create a pst file without difficulty.
I recursively walk the folders that I want saved while creating the folders in the pst where they do not already exist. As I go, I save the email as a MapiMessage. When I open the resulting pst in Outlook, it shows the message headers but I get an error message that the message cannot be found.
What follows is a prtion of the function that I use to add the message to the pst.
private static void GetMessagesInFolder(ExchangeFolderInfo folderInfo, FolderInfo fInfo, PersonalStorage pst)
{
foreach(ExchangeMessageInfo in client.ListMessages(folderInfo.Uri)
{
pst.GetFolderById(fInfo.EntryIdString).AddMessage(MapiMessage.FromMailMessage(client.FetchMessage(msgInfo.UniqueUri), OutlookMessageFormat.Unicode));
}
}