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

Free Support Forum - aspose.com

Words version 11.11 and MERGEFIELD in IF-THEN-ELSE CONDITION

We recently upgraded ASPOSE.Words to version 11.11. And the following code no longer works:

Case #«CaseNumber»Date «CalendarSetDateLong»

Date «CalendarSetDateLong»

{ASK FAVORITE "Who is your favorite Beatle - 1 for John, 2 for Paul, 3 for George, and 4 for Ringo" \o}

{IF {REF FAVORITE}=2 "I Love Paul as of {MERGEFIELD "CalendarSetDateLong"}" ""}

With the newer object, both of these output <> in place of the value. If I replace ASPOSE.Words with our former version (11.0), the merge field is output correctly.

Any advice on how we should proceed?

Thank you.

Hi Linda,

Thanks for your inquiry. Could you please attach 1) your input template Word document, 2) output Word document showing the undesired behaviour and 3) source code you used to generate output document here for testing? I will investigate the issue on my side and provide you more information.

Best regards,

While putting together sample code for you, I learned that the 11.11 version worked fine. So the problem is in our code. Since I learned that the problem lies in the order in which we’ve been replacing parameters - ASK, Merge etc.

Appreciate your response.

Hi Linda,

It's great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,