Here is the content of a word file.
Article 3 - Sa durée est fixée pour une durée de
{ MERGEFIELD NMOIS }
{ IF { MERGEFIELD NMOIS } = 1 "mois" "" }
{ = 35 + 2 }
{ MERGEFIELD NSEM }
{ IF { COMPARE { MERGEFIELD NSEM } = 1 } = 1 "semaine" "" }
{ IF { COMPARE { MERGEFIELD NSEM } > 1 } = 1 "semaines" "" }
{ MERGEFIELD NJOUR }
{ IF { MERGEFIELD NJOUR } = 1 "jour" "" }
{ IF { MERGEFIELD NJOUR } > 1 "jours" "" }
After a merge with NMOI = 3, NSEM = 2 and NJOUR = 3, when I open the word document I get:
Article 3 - Sa durée est fixée pour une durée de 3 mois mois 2 3 ,
If I force field calculation with word (CTRL+A and then F9) I get the correct evaluation which is:
Article 3 - Sa durée est fixée pour une durée de 3 mois 37 2 semaines 3 jours,
The { = 35 + 2 } is not useful, it is just to show you that it is evaluated as “mois”… which is strange, other expressions are not evaluated.
Tested with Aspose for Java 1.4 version 3.2.1 and 3.3 give the same result.
I attached part of the Word document for you to test.