View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail Merge Function with 'spouse'

The followig should do it as long as person_wifehusbandname is actually a
zero-length string, not a set of spaces:

{ MERGEFIELD personname }{ IF "{ MERGEFIELD person_wifehusbandname }" = ""
"" " & { MERGEFIELD person_wifehusbandname }" }

All the pairs of {} need to be the special field code braces that you can
insert using ctrl-F9. Everything is ordinary text that you can type on the
keyboard. The whole thing can be on a single line.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Deniz" wrote in message
...
Hi,

I need your help. I have to print labels with MS Word and ne a formula to
select the correct data and fill into my template.
I would like word to understand following:
'IF there is a wife/husband name in the record then fill in 'personname &
person_wifehusbandname' otherwise simply fill in the personname.'

How can I do this formula as a merge field?

Thank you.
Deniz