View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Mail Merge from Excel - conditional field choice?

You can use a mergefield in place of the conditional text,

{ IF { MERGEFIELD P1 } "" { MERGEFIELD P1 } { MERGEFIELD J1 } }

Use Ctrl+F9 for each pair of field delimiters { } and Alt+F9 to toggle off
their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Gordon Smith (eMVP)" wrote in message
...
I'm working through my very first mail merge and have run into an issue
which I can't solve quickly by searching google and was hoping someone
could help. I'm an MVP but **not** a Word MVP. :-)

I would like to acheive the following in a single location in my mail
merge result (labels if you care). My data is in excel and among other
data are fields P1-P8 and J1-J8. I would like the merged result to be
"the value of P1 if it's not blank, otherwise the value of J1". I'll
repeat for 2-8. I saw that I can do "if the value of P1 is blank, use
THIS text otherwise use THAT text". I don't want conditional TEXT, I want
conditional FIELD. Can this be done?

Oh yeah - I would ideally like:
"and if using J1 use background color XX (not looked up - hard coded color
is fine)"

Thanks in advance

--
Gordon Smith (eMVP)