Aspose.Words.dll mail merge issue

We have been Aspose customer for many years, so we have a historical issue that in our merge template, the merge field includes dot which Aspose does not support any more, so we renamed the merge fields before calling doc.MailMerge.Execute(). Now we found an issue that after renaming the date format is lost. For example, before renaming the merge field is {MERGEFIELD “My Field” @ “d MMMM yyyy”}, after renaming the merge field is changed to {{MERGEFIELD “Changed field”}. We would like to know whether it is possible to keep the date format after renaming.

I have attached the renaming class which we get from Aspose.

Your help is much appreciated.

Thanks,
Caifang

Hi Caifang,

With latest version of AsposeWords i.e. 16.10.0, you can rename merge field as follows:

FieldMergeField mf = (FieldMergeField)doc.Range.Fields[0];
mf.FieldName = "Changed field";
mf.Update();

Hope, this helps.

Best regards,