We have an Template which contains 3 merge fields following the Date merge field, after the merge phase we allow users to manually add text to the document. We are able to get the document to merge successfully, but when the user amends the text in all 3 fields in the merged document via Word, and views them in the Print Preview, all the changes are lost except the last one. The last mergefield present in the document retains its changed value, while all other merge fields loses their changes.
If we remove the Date from the field from the template and repeat the test we are able to see all the changes via the Print Preview.
We are using Aspose 13.8 version.
We have included two Word Templates as the one issued by our client(With out Quotes.doc)had a syntax error with the Date field – however when we addressed this in template(With Quotes.doc) – the problem persisted.
Code to replicate this problem is as follows. Attached is the template and merged document.
using(DataTable mergeData = new DataTable())
{
mergeData.Columns.Add("CUST_COUNTY");
mergeData.Columns.Add("CUST_TOWN");
mergeData.Columns.Add("USR_REF");
mergeData.Rows.Add("Leeds", "Cardiff", "YORKSHIRE");
Document doc = new Document("TESTA.doc");
doc.MailMerge.Execute(mergeData);
doc.Save("Merged Document.doc", SaveFormat.Doc);
}