Open OST file in C# Programming

I’m using C# programming to develop a program in which I have to open OST file. After reading lines of code I got stuck in errors and didn’t get any solution. Then I read so many forums to fix the errors. But still, an error occurs. I have used this lines of code for developing a program.

mail = OutlookApp.CreateItem ( Outlook.OlItemType.olMailItem )

as Outlook.MailItem;

mail.Subject = "A programatically generated e-mail";

mailRecipients = mail.Recipients;

mailRecipient = mailRecipients.Add **(** "Eugene Astafiev" **)** ;

mailRecipient.Resolve **()** ;

In the above lines of code, I got the errors. I have found this problem over this forum and found one reference but it’s not helpful for me.

https://forum.aspose.com/t/reading-ost-and-pst-files/29198

Then I found few references over the web but I’m getting confused which reference can easily fix my problem.

https://community.hortonworks.com/questions/226407/view-ost-file-in-c-language.html
https://codepad.co/snippet/dyjIh4PQ

Please provide assistance.

@john.mathew

Thank you for writing to us.
It is requested to please share Outlook OST file with us and error details so that we could investigate the issue.
You may share data file via private message. In order to send a private message, please click on my name and find “Message” button.

Moreover, you may find more details regarding reading and converting OST file at this link:
https://docs.aspose.com/display/emailnet/Read+and+Convert+Outlook+OST+File