Inserting formatted HTML into a Word Footnote

I have a Word document in Aspose.Words. I have added a number of Footnotes. For each Footnote I would like to remove the existing text and replace with formatted data. This formatted data is a html snippet which contains 1 or more paragraphs some of which include anchor tags. Is there any way in which this could be achieved?

Hi Nigel,

Thanks for your inquiry. Sure, you can replace existing text of a Footnote with HTML string by using the following code snippet:

Document doc = new Document(@"C:\Temp\in.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
foreach (Footnote note in doc.GetChildNodes(NodeType.Footnote, true))
    if (note.FootnoteType.Equals(FootnoteType.Footnote))
        foreach (Paragraph para in note.Paragraphs)
            if (para.Equals(note.FirstParagraph))
        builder.InsertHtml("<p>para 1</p><p>para 2 with <a href=''>anchor</a></p>");

I hope, this helps.

Best regards,