Free Support Forum - aspose.com

Existing MailMerge Fields Not Working in Version 8.1

We have word documents that have merge fields defined as below:

Order Deadline: «OrderDeadline\@MM/dd/yyyy»

Late Fee: «LateFee\#$#0.00»

With version 6.4 these mail merge fields work as expected. But with 8.1 they simply print as follows:

Order Deadline: «OrderDeadline\@MM/dd/yyyy»

Late Fee: «LateFee\#$#0.00»<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Attached is the test word merge template we use. Has something changed in regard to formatting mergefields in Aspose or Word?

Bill

I think we have it. Try searching Word 2007 help using: "field switches"

You have to sift through a boatload of stuff to finally come across something close.

Bill

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Field switsh should be separated from field name by white space and have only one back-slash. But in your case you have field code like this:

{ MERGEFIELD OrderDeadline\\@MM/dd/yyyy }

It should look like this:

{ MERGEFIELD OrderDeadline \@ "MM/dd/yyyy" }

Best regards.

You are correct but your single example in the documentation showed this example:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

\# $#,###.00

This failed. Word Help provides inconsistent examples sometimes including the quotes around the mask part and some that do not. Those that do not failed. Some included the space and some did not. With that kind of inconsistencies, it was very hard to determine what actually works.

Furthermore, it is impossible to get a complete list of switches from Word Help.

But thank you for your response