Need help with conditional if statement

J

Jan

I need help with a conditional if statement and can not write the syntax
correctly. Can some help? Need as follows (I am using Word 2003).

if MF item A="" and MF product A = "" then place a paragraph mark, if item
A="", MF product A, if MF product A="", MF item A, MF item A and MF product
A.

Examples base on conditions may look like:

Product A
Item A
Item A Product A

If my example is not clear,please let me know.
TIA
 
P

Peter Jamieson

If my example is not clear,please let me know.

It isn't completely clear, but I suspect what you need is something like:


{ MERGEFIELD itemA }{ IF "{ MERGEFIELD itemA }" = ""
"{ IF "{ MERGEFIELD productA }" = "" "
" "" }" " " }{ MERGEFIELD productA }

However, since you may run into trouble if both items are blank (because of
the way Word's line removal works, you may need the whole thing, e.g.

{ IF "{ MERGEFIELD itemA }" = ""
"{ IF "{ MERGEFIELD productA }" = "" "
" "{ MERGEFIELD productA }" }"
"{ MERGEFIELD itemA }{ IF "{ MERGEFIELD productA }" = ""
""
" { MERGEFIELD productA }" }" }"

where there is an ordinary paragraph mark at the end of the second line at
least.

Peter Jamieson
 

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