View Single Post
  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Michelle
 
Posts: n/a
Default If then else question

Thanks SO much - that was great. There is only one teeny thing left -
somehow I am getting 2 spaces between each record, and I'd really like only
one. I tried playing around with the quotes, but obviously don't understand
how to do it. Can you show me please?

"Doug Robbins - Word MVP" wrote:

You still need the If...then...Else... fields to check for data in Name2,
Name3, Name4 and Name5. If there is not data insert nothing, if there is
data, insert that data preceeded by whatever it is that you want to separate
it from the previous item.

The construction will be

{ MERGEFIELD Name1 }, { MERGEFIELD Name1Description }{ IF { MERGEFIELD
Name2 } = "" "" "; { MERGEFIELD Name2 }, { MERGEFIELD
Name2Description }" }{IF { MERGEFIELD Name3 } = "" "" "; { MERGEFIELD
Name3 }, { MERGEFIELD Name3Description }" }{IF { MERGEFIELD Name4 } = "" ""
"; { MERGEFIELD Name4 }, { MERGEFIELD Name4Description }" }(IF { MERGEFIELD
Name5 } = "" "" "; { MERGEFIELD Name5 }, { MERGEFIELD Name5Description }" },
and

Note that there is no space between the } and the { IF

--
Hope this helps.