We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exporting a Paragraph to HTML

Exporting an entire Document to HTML is pretty straight forward. Is there a way to convert just a paragraph or group of paragraphs to HTML?

Thanks in advance.


Thanks for your interest in Aspose.Words. Yes, you can achieve this using Aspose.Words e.g. please use the following code to get HTML representation of individual Paragraphs:

Document doc = new
Document(MyDir + @“in.docx”);

StringBuilder sb = new StringBuilder();

foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))


I hope, this helps.

Best regards,

Thanks, that’s exactly what I needed. I overlooked the overloaded methods of ToString.