Free Support Forum -

Mailmerge with If not working

I have a Word 2003 File with a MailMerge IF construction in it and it looks like the IF statement is not executed. I tried it out with the newest Words version.

It works if I run the merge directly in Word itself.

The construct looks like this:

{ IF { MERGEFIELD DocumentName } = "" "" "Dokument:" }

The word Dokument should only appear if the DocumentName is not "". The command is inside a table, but also outside from it, it did not work.

I've attached the Wordfile, a demo db and the code file (just in case).




Thank you for your report and attachement. Sadly, we do not support the evaluation of field formulas yet. We are aware of the fact this feature is essential but unfortunately it is several months away.

Ok, unfortunate. I guess have to find another solution. Anyway, I have another somewhat unrelated issue.

doc.Save("Rechnung_Supertext.doc", SaveFormat.FormatDocument, Aspose.Words.SaveType.OpenInBrowser, Response);

If I choose "Save" in the Browser Dialog box everything is fine and the file is saved as "Rechnung_Supertext.doc", but if I choose open, the filename becomes the name of the aspx file that handles this task. Not a terrible thing, but I would assume easy to fix. It works whenever I load a file directly from the db into the browser.



Do you use the latest version of Aspose.Words, This issue should have been recently fixed.

Is there any progress/news about the evaluation of field formulas?




Thanks for your request. Unfortunately, conditional logic is still not supported. Also see FAQ

<span style=“font-size: 12pt; font-family: “Times New Roman”;”>Best regards.