Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi,
I am using below code to get the content from word document using Open xml SDK. I want to convert that to html with the formatting is there any option available to convert or we need to do it by parsing xml.

string Path = Server.MapPath("Files\\Resume.docx");
if (File.Exists(Path))
{
   using (WordprocessingDocument myDoc = WordprocessingDocument.Open(Path, true))
   {
       Body body = myDoc.MainDocumentPart.Document.Body;
       XmlDocument xmlDoc = new XmlDocument();
       xmlDoc.LoadXml(body.OuterXml);
   }
}


Thanks in advance.
Posted
Updated 17-Feb-14 18:21pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900