Free Support Forum - aspose.com

Non-merge Fields

I tried to use the non-merge fields feature with no success. This is the content of my word document

{IF { MERGEFIELD DocumentNumber } = 10 "Document selected" "Document NOT Selected" \*MERGEFORMAT}

When runing the application it does not fail, just spits out the IF statement as it is. I have also set the UseNonMergeFields = true. Can you explain why it is not working? Alos, Can you provide a sample Word document with a simple IF command?

Thanks,

Carlos

Aspose.Words does no calculate fields, just keeps them as they are. When you do MailMerge in Aspose.Words merge fields will be filled with data but IF fields will just stay. If you want to make conditional processing of Word documents using Aspose.Words you need to move the logic from document to program code.