I am trying to insert the content of different Word Documents in my "master" document. I build a Table from the scratch using a Documentbuilder and it's methods StartTable, InsertCell and EndRow. How can i add the content of another Word Document to the actual cell of the Table.
I saw your Wiki article and I found it very helpful, but the posted code only shows how entire Sections can be added to the end of the document. I tried to adapt the code to my needs, but the result is always the same. The desired nodes from the source documents are added to the end of the "master" document.
My code looks as follows:
For Each srcSection As Section In mySourceDocument
For Each srcBody As Object In srcSection.ChildNodes
For Each srcChildNode As Object In srcBody.ChildNodes
Dim dstChildNode As Node = oDocumentBuilder.Document.ImportNode(srcChildNode, True, ImportFormatMode.UseDestinationStyles)