Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Fiona Fiona is offline
external usenet poster
 
Posts: 18
Default Mail Merge Greetings for individuals and Couples

Hi folks

Am new to mail merge, and have had a task asked of me, so thanks in advance
for your help!

We need to create a template that correctly greets both individuals and
couples. ie "Dear Bob", or "Dear Bob and Sue", depending on the data
available. Can you help me with the correct way to do this?

The data source (relational database) is such that there may or may not be a
spouse associated with the primary person, so I need the template to have
some kind of condition that if the letter is for a couple, it adds "and"
before the second name, and if it is just to an individual then it doesnt.

Hope this makes sense, and is possible. Not sure if some kind of macro is
required?

Thanks!

  #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 Greetings for individuals and Couples

What to do depends on exactly how your data is set up (and in theory
there's a shortcut in Word 2002 and later for some situations)

e.g. if
a. the two fields you need are /always/ in the same record
b. you have fields like
primaryforename
secondaryforename
c. primaryforename is never blank and you always want at least

Dear primaryforename

d. if secondaryforename not blank, you add

and secondaryforename

then you can use

Dear { MERGEFIELD primaryforename }{ IF "{ MERGEFIELD secondaryforename
}" "" " and { MERGEFIELD secondaryforename }" "" }

The nested IF field is a field placed in the appropriate place in your
document's text like any other - it's not a "macro" in the sense usually
understood in Word. But each pair of special field code braces {} must
be the sort you can insert using ctrl-F9, not the ordinary ones you can
type on the keyboard. Also, I'm assuming that when the secondaryforename
field is blank (or perhaps null), what gets through to Word is an empty
string "", not e.g. " " or something else.

If you are only using Word 2002 or later, in the above situation you
should also be able to use

Dear { { MERGEFIELD primaryforename }{ MERGEFIELD secondaryforename \b "
and " }

However, I have to say that this seems to hang Word rather more
frequently that I would want to put up with.


Peter Jamieson

http://tips.pjmsn.me.uk

Fiona wrote:
Hi folks

Am new to mail merge, and have had a task asked of me, so thanks in advance
for your help!

We need to create a template that correctly greets both individuals and
couples. ie "Dear Bob", or "Dear Bob and Sue", depending on the data
available. Can you help me with the correct way to do this?

The data source (relational database) is such that there may or may not be a
spouse associated with the primary person, so I need the template to have
some kind of condition that if the letter is for a couple, it adds "and"
before the second name, and if it is just to an individual then it doesnt.

Hope this makes sense, and is possible. Not sure if some kind of macro is
required?

Thanks!

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge - desktop e-mail letters to individuals quinn111 Microsoft Word Help 1 September 3rd 08 10:32 PM
Editing restrictions don't work for individuals Lisa Microsoft Word Help 0 July 19th 07 06:36 AM
Merge Email with cc contacts to specific individuals yvonneb Mailmerge 3 March 14th 07 01:26 AM
Can I merge labels of 2 individuals to send just to one address? JenniferatCFPA Mailmerge 1 March 1st 06 09:54 PM
e-mail merge different records to group of individuals? Plastic Graduate Mailmerge 1 April 18th 05 09:23 AM


All times are GMT +1. The time now is 04:53 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"