I’m using Aspose Words to do a mail merge in a series of legal documents with lots of l clauses, and where there are lots of linked Cross References between the clauses (Ex: in the text of clause 2 there is a mention to clause 3, so if you click the 3 you’ll jump to the respective clause)
What happens when I execute the MailMerge action over this document is that besides replacing correctly the mail merge fields, it also replaces the linked clause numbers by the complete text of the clause (Ex: replaces the text “3” in the clause 2 by the complete text of the clause 3).
Worse, if clause 2 mentions clause 3 and clause 3 mentions clause 2, the Mail Merge action goes into a loop and the memory used by the .Net Worker Process goes sky high, until it simply recycles.
Is there a way (setting or parameter) that can be used to avoid the Cross References to being replaced when I execute the MailMerge?
Thanks for your inquiry.
Could you please attach a sample template here for testing? Please note that you can replace any sensentive data with dummy data, and we only need a small block that demonstrates the issue.
I have attached two files.
The file SampleWordTemplate.docx is a sample template just to exemplify the behavior that I described above.
The file SampleWordTemplate_Merged.docx is the resulting file after I execute the MailMerge action over the SampleWordTemplate.docx file.
Please let me know if you need further detail.
Thanks in advance for your help.
Thank you for additional information. I cannot reproduce the problem on my side using the latest version of Aspose.Words (10.1.0) and the following code for testing:
Document doc = new Document("C:\\Temp\\SampleWordTemplate.docx");
}, new string
Could you please try using the latest version of Aspose.Words and let me know how it goes on your side?
With version 10.1.0 it worked fine.
Thank you very much for your help.