Merged codes inserted into a mapped rich text control not merging

Apologies, Can you please try this link Recording

@archanarc Thank you for additional information. As I can see from the video after filling document with data using Aspose.Words the document is postprocessed by MS Word Office Interop. Have you tried saving the document right after generating report using Aspose.Words and before postprocessing the output document?
If possible, could you please create a simple console application that will produce the problematic output? It is not required to add license file. Aspose.Words will still work without the license, jut in evaluation mode.
Also, please try using the latest 24.5 version of Aspose.Words.

Thanks for the suggestion @alexey.noskov .

I tried to update the package for latest version and I am getting a reference error, only thing I changed is updated aspose to latest version. Do I need to do anything with the license? Please guide

@archanarc No, the exception does not have anything related to license. Looks like the reference to Aspose.Words was updated improperly. Is the reference to Aspose.Words added via NuGet? Have you recompiled the application after updating the reference?

Thanks @alexey.noskov , I will check those reference issues. Please note that I created a sample application with just processing the file with Aspose. Its working :slight_smile:

So the issue here is with the other processing and which is important for our application :frowning:
Is there anything I need to consider when processing with Aspose. Thanks!

@archanarc Most likely the problem in your case because SDT is updated and the custom XML part linked to the SDT has LINQ reporting syntax in it. You can remove XML mapping:

foreach (StructuredDocumentTag tag in doc.GetChildNodes(NodeType.StructuredDocumentTag, true))
    tag.XmlMapping.Delete();

Hi @alexey.noskov , Looks like we are removing all the xml mapping here. However we need to have the custom mapping in the document, that’s what our requirement was.

@archanarc Yes, the code completely removes Xml mapping. Unfortunately, i do not see any other option to resolve the problem using Aspose.Words.

Oh, thats sad :frowning: It won’t serve the purpose of our whole logic. We need to have xml tag on that document. Still, the question is why its working just with the doc processing and not with any additional processing we done as in the recording.

@archanarc Looks like you further processing the document updates SDT content and replaces existing content with content form the mapped XML.