Mail Merge from Excel - conditional field choice?

  • Thread starter Gordon Smith \(eMVP\)
  • Start date
G

Gordon Smith \(eMVP\)

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
 
D

Doug Robbins - Word MVP

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
 

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