Error! Unknown op code for conditional.

S

Scott

I've been scratching my head over this for a few hours now, but can't seem to figure out what's wrong

{ IF { MERGEFIELD FFALTSTAIR } "{ IF EXIST { MERGEFIELD FFALTSTAIR } }" "two"

FFALTSTAIR contains a numeric value. In my test input, the value of FFALTSTAIR is 4. The merge seems to be detecting that FFALTSTAIR contains a value (otherwise it would display "two"), but instead of displaying the value of FFALTSTAIR it outputs the error message "Error! Unknown op code for conditional." I've tried everything I can think of including copying and pasting it over top of itself, as well as deleting it and entering it again

I don't know if it matters, but my data source is a comma-delimited text file. The output is a 200-page Word document. All the other field codes are working fine except for this one which occurs in three separate places within the document.
 
M

macropod

Hi Scott,

Your IF test is incomplete you need to have something like:
{IF{MERGEFIELD FFALTSTAIR}= 4 "Four" "two"}

Cheers

Scott said:
I've been scratching my head over this for a few hours now, but can't seem to figure out what's wrong.

{ IF { MERGEFIELD FFALTSTAIR } "{ IF EXIST { MERGEFIELD FFALTSTAIR } }" "two" }

FFALTSTAIR contains a numeric value. In my test input, the value of
FFALTSTAIR is 4. The merge seems to be detecting that FFALTSTAIR contains a
value (otherwise it would display "two"), but instead of displaying the
value of FFALTSTAIR it outputs the error message "Error! Unknown op code for
conditional." I've tried everything I can think of including copying and
pasting it over top of itself, as well as deleting it and entering it again.
I don't know if it matters, but my data source is a comma-delimited text
file. The output is a 200-page Word document. All the other field codes are
working fine except for this one which occurs in three separate places
within the document.
 
G

Graham Mayor

And to test for content
{IF {Mergefield FFALTSTAIR} <> "" "2" "4"}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top