Search code examples
if-statementms-wordconditional-statementsmailmerge

Error! Unknown Op code for conditional MS Word 365


I am trying to do a mail merge and am using the code below. Note: the {} are made with CTRL +F9. Error Code

and I keep getting the above error. A similar code is use in many other parts of my document and are working fine. Non-Error Code

Can anyone help with what is triggering this error.


Solution

  • It would be surprising if either field in your post was working properly given that neither is properly constructed. Both lack an operator before the first "" and a space between the = and 0

    In any event, all you need is:

    {IF{MERGEFIELD MidYear_MAP_Test_Points_Grade_Numeric_}<> "" {MERGEFIELD MidYear_MAP_Test_Points_Grade_Numeric_ \# "0.00,,'Missing'"}}
    

    and:

    {IF{MERGEFIELD USATP_4_Points_Grade_Numeric_MaxPoints}<> "" {MERGEFIELD USATP_4_Points_Grade_Numeric_MaxPoints \# "0.00,,'Missing'"}}