Maintain metadata template after insertDocument/appendDocument operation

Hello.

I’m trying to merge severall documents (Word, PPT and Excel) into a single Word file. Some of the Word files like this one st10222.sv22.docx (48.0 KB)
contain some xml metadata that is then used by other third party tools for further manipulation.

This specific content is visible as an image when the third party plugin is not installed in Word, so you will also probably see an image, however in reality if you have the plugin installed and double click in the image then the plugin can interpret the xml/metadata and change the contents of the image.

The issue we are facing is that when we merge these documents we loose this information. For example if I simply load the document and save it with aspose the resulting word is _MergedDocuments.docx (31.8 KB), which does not contain this metadata/xml.

Is there a way to maintain this information when we either insert these documents with documentBuilder.insertDocument() or append with with document.appendDocument()?

Thank you.

@m1tnick I have inspected your input and output document and noticed that customXml folder is missed from the output document. However, I do not see any references to the custom XML in the document, there is a relationship to the custom XML, but it is not used in the document (document.xml.rels):

<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml" Target="../customXml/item1.xml"/>

Since the relationship is not used in the document it is considered as redundant and is removed by Aspose.Words. Could you please confirm the metadata you are talking about are stored in the customXml?