static void Main() { // Create converter instance using (DocxToHtmlConverter converter = new DocxToHtmlConverter()) { // Perform conversion converter.ConvertDocxToHtml("sample.docx", "result.html", false); } // Open result document in Internet Explorer Process.Start("iexplore.exe", Path.GetFullPath("result.html")); }
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 file in default browser Process.Start("result.html"); }
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); }