Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail merge - desktop e-mail letters to individuals | Microsoft Word Help | |||
Editing restrictions don't work for individuals | Microsoft Word Help | |||
Merge Email with cc contacts to specific individuals | Mailmerge | |||
Can I merge labels of 2 individuals to send just to one address? | Mailmerge | |||
e-mail merge different records to group of individuals? | Mailmerge |