public void GetFieldNames()
{
Document doc = new Document();
//ExStart
//ExFor:MailMerge.GetFieldNames
//ExId:MailMergeGetFieldNames
//ExSummary:Shows how to get names of all merge fields in a document.
string[] fieldNames = doc.MailMerge.GetFieldNames();
//ExEnd
}