Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jan
 
Posts: n/a
Default Need help with conditional if statement

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
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

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


"Jan" wrote in message
...
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



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional inclusion of WordArt? Bill Watkins Mailmerge 13 February 1st 05 03:51 PM
How do I copy a scanned signature into an if/or statement in Word mcgowan Mailmerge 2 February 1st 05 06:37 AM
complex conditional merge Walter Mailmerge 0 January 9th 05 12:49 AM
Conditional Cross Ref. Fr. Robert Microsoft Word Help 3 January 5th 05 08:47 PM
Insert carriage return in mergefield statement dixie Mailmerge 2 December 22nd 04 03:42 AM


All times are GMT +1. The time now is 07:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"