469,954 Members | 1,793 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

Free MSG to EML Converter Software

Which is the best and free way to convert MSG to EML
Dec 28 '19 #1
1 2977
Luuk
1,044 Expert 1GB
In C#:

Expand|Select|Wrap|Line Numbers
  1.             Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();
  2.  
  3.             var item = app.Session.OpenSharedItem(@"D:\TEMP\test.msg") as Microsoft.Office.Interop.Outlook.MailItem;
  4.             string body = item.HTMLBody;
  5.             int att = item.Attachments.Count;
  6.             //item.SaveAs(@"d:\temp\test.html", OlSaveAsType.olHTML);
  7.             item.SaveAs(@"d:\temp\test.eml", OlSaveAsType.olTXT);
  8.             app.Quit();
  9.  
Jan 25 '20 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by daokfella | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.