From your description, it seems that the MERGEFIELD code is not being evaluated and is instead being displayed as text.
One possible reason for this could be that the field code is not being updated. To update the field codes, you can press F9 or right-click on the field and select "Update Field."
Regarding the syntax of your IF statement, here's an example of what it should look like:
Notice that the second IF statement is enclosed in quotes. This is because it is being used as the "false" value for the first IF statement.
If the above solution does not work, you may want to try replacing the curly braces with chevrons, as some versions of Word require this. Here's an example:
or maybe
This statement checks if Code_1 is empty, and if it is, it displays Code_2. If Code_2 is empty, it displays Code_1. If both fields have values, it displays both fields separated by a forward slash.
Make sure to include the curly braces {} around each field and the entire statement.
Bookmarks