Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active September 20, 2024 12:26
Show Gist options
  • Save aspose-com-gists/d4eaa546115fdcec08af9d5e34037a17 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/d4eaa546115fdcec08af9d5e34037a17 to your computer and use it in GitHub Desktop.
HTML Document Conversion using .NET

Convert MHTML Documents via Aspose.Total for .NET

Convert MHTML files using .NET application into many formats including docm, dot, dotm, dotx, flatopc, gif, markdown, mhtml, odp, odt, otp, ott, pcl, pot, Powerpoint, potm, potx, pps, ppsm, ppsx, ppt, pptm, ps, rtf, swf, wordml, xaml, xamlflow.

https://products.aspose.com/total/net/conversion/mhtml-to-docm/

Installation

Install from command line as nuget install Aspose.Total or via Package Manager Console of Visual Studio with Install-Package Aspose.Total.

Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads.

Document document = new Document("template.mhtml");
document.Save("DocOutput.doc", SaveFormat.Doc);
var outputDocument = new Aspose.Words.Document("DocOutput.doc");
outputDocument.Save("output.docm", SaveFormat.Docm);
Document document = new Document("template.mhtml");
document.Save("DocOutput.doc", SaveFormat.Doc);
var outputDocument = new Aspose.Words.Document("DocOutput.doc");
outputDocument.Save("output.gif", SaveFormat.Gif);
Document document = new Document("Decrypt.mhtml", "password");
document.Decrypt();
document.Save("Decrypt_out.doc");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment