Hello,
We have word documents that we use Aspose Words mailmerge functionality to merge data from our data base. We are in the process of updating to a newer version of Aspose Words (19.4) from 14.5. During this update one thing we noticed was that when we use an if statement test for an empty field on mailmerge and we have the true blank result hidden. It does not evaluate the IF statement at all.
For example in a Word document we have this if statement:
{ if { MERGEFIELD TestFieldValue * MERGEFORMAT } = “” “” “Found Data” * MERGEFORMAT }
and if in Word we highlight the “” true criteria and set the font to hidden. When we run the mailmerge and the field is NOT empty we get no output. If we set the font to not be hidden then the if statement works properly. Also we found that if we have it set to hidden and we add an extra empty un-hidden true clause (below) the if will work fine also.
{ if { MERGEFIELD TestFieldValue * MERGEFORMAT } = “” “” “” “Found Data” * MERGEFORMAT }
I have included a simple example for your consumption. Also, I have included the output file generated with both the New and Old versions.TestForm.zip (4.8 MB)
thanks