We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Escape brackets

Hi there,

I have a problem with brackets in my IF fields :

{ IF “{ MERGEFIELD VALUE1 }” = “test ( 1” “OK” “KO” }
{ IF “{ MERGEFIELD VALUE2 }” = “test ) 2” “OK” “KO” }

As we can see in my example there is a first open bracket in the first IF and I close the backet in the second IF field

When VALUE1 = “test ( 1” and VALUE2 = “test ) 2” Aspose Word doesn’t parse correctly and crashes. If I remove the 2 brackets the bug disappears.

Is it possible to escape the brackets directly in the IF field?

Thx, Blackskiz

Hi Alexis,

Thanks for your inquiry.

Perhaps, you’re using an older version of Aspose.Words; as with Aspose.Words v11.1.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v11.1.0. Moreover, please read the following article on How-to: Migrate to Aspose.Words 10.5 or Higher:

I hope, this will help.

Best Regards,