Inserting formatted Text (merging documents)

Hello,

I am trying to convert our Office Automation application to Aspose (Words for .Net), and run into the functionality where we used to inject formatted text from one document into another at the place of a Mergefield. (via Range.FormattedText)

As Aspose Words does not have such a property (as it is node based) I tried to copy over Nodes from the source document. However, I run into the error that the node types I try insert are not allowed at that location. (the mergefield can be in the middle of a paragraph, or more commonly, in a cell in a table.)

I noticed an old post that seems to refer to what I need, but it contained a dead link:
https://docs.aspose.com/words/net/insert-and-append-documents/

So, can you please inform me how I can copy over the formatted content?

I currently have (not working):

builder.MoveToField(myField, True)
For Each subsection As Aspose.Words.Section In embedBlockDoc.Sections
    Dim clone As Aspose.Words.Node = subsection .Clone(True)
    clone = e.Document.ImportNode(clone, True)
    builder.InsertNode(clone)
Next

Hi

Thanks for your inquiry. This article was moved here:
https://docs.aspose.com/words/net/insert-and-append-documents/
I think it could help you to achieve what you need.
Best regards.

Thank you, that indeed helped me to do exactly what I hoped for.