We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Remove Field

If I have the index value of a merge field, how can I remove it?

Thanks for your request. Merge field will be removed if you fill it with empty data. See the following code.

Document doc = new Document(@"259_98243_derekmhart@yahoo.com\in.doc");
int index = 1;
string[] names = doc.MailMerge.GetFieldNames();
doc.MailMerge.RemoveEmptyParagraphs = true;
doc.MailMerge.Execute(new string[] { names[index] }, new string[] { string.Empty });

I hope that it will help you.
Best regards.