Free Support Forum - aspose.com

Mail merge codes

I saw in a recent post that you planned to make full field code information availbale through the API starting with 4.0.2. That is great and something we definitely need. I was wondering if it would be possible to add a function alongside MailMerge.GetFieldNames() such as MailMerge.GetFields() that would also make the additional switches available to the developer prior to the merge execution.

What we're trying to accomplish - and maybe you can suggest an alternative route - is a way to embed filter information in the merge tables. So something like this:

{MERGEFIELD TableStart:CustomersA \filter "Last_Name,A"}

would merge only the customers with last name starting with A in that table. We're trying to avoid having to put the filtration info in the merge field name itself, but this seems to be the only way to do this currently. I'm hoping that 4.0.2 will remove this limitation.

Thanks.

I wrote about this before. Take care when adding you own switches to MS Word fields. MS Word has a tendency to discard them. I’m not exactly sure when it happens, but if you edit a field or update fields, it does discard all field codes apart from its own.