Method to return Mail Merge field names


#1

We do not maintain a list of all mail merge fields that exist on a given word document. Is it possible to have a method in aspose.report (or aspose.word) that returns the names of all the mail merge fields in a doc?

What I have in mind is a method that I can call directly before calling doc.MailMerge.

For example:

ds = doc.GetMailmergeItems()
doc.MailMerge(ds, dsvalues)

Thanks,
Scott


#2

Hi Scott,

This is a good request and in line with our plans to develop the API.

This feature will be included in Aspose.Word 1.1 which is due to be released tomorrow, 20th Jan.

string[] fieldNames = doc.MailMerge.GetFieldNames();


#3

Hi Scott,

This feature is available in the latest release, more details at http://www.aspose.com/forums/ShowPost.aspx?PostID=3710.