Welcome › Forums › General PowerShell Q&A › Unable to open OST file in C# [.net]
- This topic has 1 reply, 2 voices, and was last updated 2 years, 2 months ago by
Inactive.
-
AuthorPosts
-
-
November 14, 2018 at 10:50 am #124638
I’m working as a Junior Application Developer in MNC. I’m trying to develop an application where I have to open OST file in C# programming. I’m using C# 7.0 version in Visual Studio 2017. In the latest version, I can easily use local functions while developing an application. While writing code I’m facing errors in code. The following code I’ve used:
try
{
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();
if (mailRecipient.Resolved)
{
mail.Send();
}
else
{
System.Windows.Forms.MessageBox.Show(
“There is no such record in your address book.”);
}
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message,
“An exception is occured in the code of add-in.”);
}
After searching a lot about this error on this forum. I have found one topic related to OST.
https://powershell.org/forums/topic/can-powershell-convert-ost-to-pst/
I can’t get a solution on above thread. Then I searched on other forums and found few references. Please refer these references and provide your suggestion.
https://codepad.co/snippet/dyjIh4PQ
https://community.hortonworks.com/questions/226407/view-ost-file-in-c-language.html
-
November 14, 2018 at 10:53 am #124647
First question: What errors are you actually seeing when trying that code?
Second up: Are you trying to reimplement this in PowerShell? If not, you may find more luck posting on a more C# heavy forum, or on Stack Overflow (or one of their subsites). You may notice that you’ve posted this in the “General PowerShell Q&A”, which doesn’t really seem to cover this question.
-
-
AuthorPosts
- The topic ‘Unable to open OST file in C# [.net]’ is closed to new replies.