Free Trial
Web API version
Licensing
Request A Quote
HAVE QUESTIONS OR NEED HELP? SUBMIT THE SUPPORT REQUEST FORM or write email to SUPPORT@BYTESCOUT.COM
Convert DOCX to HTML | C#
Program.cs:
C#
using System.Diagnostics; using Bytescout.PDF.Converters; // IMPORTANT: This functionality is outdated! Please try Web API version for better results. Free signup: https://pdf.co/ namespace ConvertDocxToHtml { class Program { static void Main(string[] args) { using (DocxToHtmlConverter converter = new DocxToHtmlConverter()) { converter.IndentHtmlCode = true; converter.WriteByteOrderMark = true; converter.ConvertDocxToHtml("sample.docx", "result.html", true); } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.html"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }