Skip to content

Instantly share code, notes, and snippets.

How to Convert MSG to TXT using C#. For more information, please follow link: https://kb.groupdocs.com/conversion/net/how-to-convert-msg-to-txt-using-csharp/
using GroupDocs.Conversion;
namespace ConvertMSGtoTXTUsingCSharp
{
internal class Program
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Conversion library
License lic = new License();
lic.SetLicense(@"GroupDocs.Conversion.lic");
// Import MSG document
var converter = new GroupDocs.Conversion.Converter("input.msg");
// Get conversion option for final output document
var conversionoptions = converter.GetPossibleConversions()["txt"]
.ConvertOptions;
// Save the TXT to disk
converter.Convert("output.txt", conversionoptions);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment