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

Free Support Forum - aspose.com

Content Control rich text values


Using Aspose I want to check if I can directly extract rich text value from the Content control of rich textbox.

In a word document I have content control of form rich text box. User suppose comes and enter -

Hello World

Now I want to extract rich text html format from that control which would return me something like -

Hello World

Is it possible to extract such rich text html format using aspose?



Hi Prashant,

Thanks for your inquiry. You can get HTML representation of content controls using the following code:

foreach (StructuredDocumentTag sdt in doc.GetChildNodes(NodeType.StructuredDocumentTag, true))


string html = sdt.ToString(SaveFormat.Html);


I hope, this helps.

Best regards,

thanks it worked !!!