How to recognize if a field was not merged in C#

Hi:


We have a requirement to tell if a field was not merged. For example, if the <<merge_field>> remains on the merged document.

I see a way to remove it: doc.MailMerge.UseNonMergedFields, but, I’m looking for a way to catch if there is any merged field not merged and throw an error.

Thank,
Gary.

Hi Gary,


Thanks for your inquiry. After performing mail merge operation, you can get a collection of mail merge field names which are still available in the document using Document.MailMerge.GetFieldNames method. Hope, this helps.

Best regards,

Thanks. That works…