Free Support Forum - aspose.com

Searching doc for merge field

Is there a simple way to determine if a particular mergefield exists in a document? Before I go to the trouble of retrieving the data to merge, I want to make sure my document has the field I will be merging.

Surely. Use MailMerge.GetFieldNamesEx that returns a collection of merge field names contained in the document.