Compound "IF" formatting issue

J

J_Piazza

Could someone please tell me what I am doing wrong with formatting the "IF"
test below. I have compared it repeatedly to examples on the Web. When I
toggle out of the field code view, instead of disappearing I see a shaded
"{". The validator finds no errors.

{IF { = AND ( { COMPARE { MERGEFIELD Hope_Fund_Flag } = "Y"}, { COMPARE {
MERGEFIELD ABC_Flag } = "Y" } ) } = 1 "{ INCLUDETEXT "C:\\Documents and
Settings\\piazzaj.000\\Desktop\\Mail Merge Merge\\Hope Fund Status.doc"
Hope_Anu}" ""}

Thank you
 
G

Graham Mayor

It works here - my guess is that you have not used CTRL+F9 for each pair of
field boundaries. In particular, what is the orphan Hope_Anu bit all about?
Something along the lines of

{ INCLUDETEXT { IF{ =AND ({ COMPARE{ MERGEFIELD Hope_Fund_Flag \*upper} =
"Y" },{ COMPARE{ MERGEFIELD ABC_Flag \*upper} = "Y" }) }= 1
"C:\\Documents and Settings\\piazzaj.000\\Desktop\\Mail Merge Merge\\Hope
Fund Status.doc" "C:\\Documents and Settings\\piazzaj.000\\Desktop\\Mail
Merge Merge\\Blank.doc"} }

should prove more reliable. In this instance you will have to create a blank
document for the Nul condition or you will get an error message.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Peter Jamieson

It looks OK here too, and I agree with your analysis. There is one other
possible though unlikely explanation:
In particular, what is the orphan Hope_Anu bit all about?

I assume it is intended to be the name of a bookmark in the included
document. If the included document happens to contain a "{" character and
that is the only character that has been bookmarked (probably wrongly) as
"Hope_Anu", then the result would be as described.

Peter Jamieson
 
J

J_Piazza

Thank you ... that solved the problem. I started with CTL + F9, I just didn't
realize I needed to do it for each section.
 

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