Does anyone have a sample application or upload to web to convert from word to html or xhtml.
Hi,
I have the same request. Is your sample console application still available?
Kind regards.
You can use the following simple code to convert Word document to HTML:
Document doc = new Document(MyDir + @"input.docx");
HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.Html);
opts.PrettyFormat = true;
doc.Save(MyDir + @"18.3.html", opts);
You can also save your Word document to XHTML by using the following code snippet:
Document doc = new Document(MyDir + @"input.docx");
doc.Save(MyDir + @"18.3.xhtml");
Thanks for the speedy response.
We are looking for conversion filters so users can open their DOC file, for example, and save it as a DOCX file in our Windows product.
Therefore we would like to test that round-tripping with customer files before purchasing.
Is that possible? Is there a sample application we could use to test and make a decision on purchasing without involving a developer?
Kind regards, Cindy
Please check the following simple console application:
ConsoleApp1.zip (155.8 KB)
You can also do open/save operations by using the DocumentExplorer example project.
DocumentExplorer example project