If i want to create a pst file but file mode is append so how to create it
Hi Pooja,
You can open an existing PST for reading purpose and add messages/items to it. This will treat the PST to be opened in append mode. Please have a look at the following code for your kind reference that opens an existing PST, accesses its predefined folder “inbox” and adds 2 messages to it.
Sample Code:
PersonalStorage pst = PersonalStorage.FromFile(“Test.pst”);
FolderInfo inbox = pst.GetPredefinedFolder(StandardIpmFolder.Inbox);
inbox.AddMessage(MapiMessage.FromFile("ForFollowUp.msg"));
inbox.AddMessage(MapiMessage.FromFile("GmailMsg.msg"));