Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, July 1, 2013 5:30 AM
I need to convert word document doc or docx to xhtml.Please suggest me best way for this.
I were currently checking http://blog.maartenballiauw.be/post/2008/01/11/Preview-Word-files-%28docx%29-in-HTML-using-ASPNET-OpenXML-and-LINQ-to-XML.aspx
But it has problem with tables and some formating issue.I wanted to avoid any custom coding for any particular document
Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])
All replies (7)
Monday, July 1, 2013 7:03 AM
Could the interop API be of any help? http://www.codeproject.com/Articles/507068/Microsoft-Interop-API-to-convert-the-doc-docx-dot
Monday, July 1, 2013 9:23 AM
How is the third API? If so, you could refer to http://netword.codeplex.com/
Monday, July 1, 2013 9:44 AM
Use Microsoft Office Interop library to convert format .
objWord.Documents.Open(FileName: FullFilePath);
objWord.Visible = false;
if (objWord.Documents.Count > 0)
{
Microsoft.Office.Interop.Word.Document oDoc = objWord.ActiveDocument;
oDoc.SaveAs(FileName: FileToSave, FileFormat: 10);
oDoc.Close(SaveChanges: false);
}
Monday, July 1, 2013 9:45 AM
you can take a look at another option
Monday, July 1, 2013 10:22 AM
Thanks all
What i have is some .docx files saved in some directory.I have to load it into some text editor (telerik editor in partiular) on some page load event.
Gary Zahl have you used your's mentioned solution? i have already tried.It's too much expensive.But even then i have tried it.It doesn't has any method to get the html of the loaded document in some string.[if you know how to load html then please let me know]
M--G Also don't used the interop solution but if it can give me the xhtml string from the doc then please let me know.
Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])
Friday, January 31, 2014 8:15 PM
PowerTools for Open XML just released a new HtmlConverter module, which is an open source, free implementation of a conversion from DOCX to HTML formatted with CSS. It supports all paragraph, character, and table styles, fonts and text formatting, numbered and bulleted lists, images, and more. See http://bit.ly/1bclyg9
Thursday, December 17, 2015 2:09 PM
This tool is opensource and fully customizable.
It manages css styles from word styles.
http://www.gekoproject.com/component/k2/18-docx2html
Simple!