View Single Post
  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default If then else question

Is that two spaces between the semicolon and the first letter of the
following name? Or, do you mean each record in the data source?

--
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

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