Fields in Word Document

Hi Support,
We are using fields in a word document something like as follows:
{ IF { MERGEFIELD SomeDT.Field } = "50.00" "Its Good" "Not Good" \* MERGEFORMAT}
its not working. As soon as it finishes mail merge it says “error unknown op code for conditional”. Not able to figute out what is the problem.
Please help me with any example. I want merge fields in field condition.

Hi
Thanks for your inquiry. It seems you are using an old version of Aspose.Words. The latest version of Aspose.Words is 10.4.0; you can download this version from here:
https://releases.aspose.com/words/net
If it does not help, could you please attach your input document here for testing? I will check the problem on my side and provide you more information.

Best regards,

Hi Support,
I have tried using the latest version but no success. I am attaching the input template and output document as attachments for further reference. Please help me.
Thanks,
ValuePRO

Hi there
Thanks for attatching your document here.
The reason for this issue is because the content within your IF field is not a real merge field, instead it is just plain text.
You simply need to insert a proper merge field inside the IF field for everything to work. You can view field codes in the document to achieve this by pressing ALT+F9.
I have fixed this in your template and attached the new template here.
If I can help you with anything else, please feel free to ask.
Thanks,

Hi Support,
Thanks for all the help you are doing. I really appreciate your work.
Thanks and Regards,
ValuePRO