View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Stuart Troy[_2_] Stuart Troy[_2_] is offline
external usenet poster
 
Posts: 3
Default Names and address list in Excel-mail merge to Word for labels

Hi Dee,



If you don't like the results of the block address, you could insert the
fields manually to create the address block exactly as you'd like it.



The field code formula below will accomodate the 3 name variations you
stipulated.

1. Same Surname "John & Mary Smith"

2. Different Surname "John Smith & Mary Jones"

3. Individual "John Smith"



This is the field code formula. You need to create the braces using CTRL+F9
(you can't just copy and paste my text).



{ MERGEFIELD "First1" } { If { MERGEFIELD "Last2" }="" { MERGEFIELD
"Last1" } {

If { MERGEFIELD "Last2" }={ MERGEFIELD "Last1" } "& { MERGEFIELD "First2" }
{

MERGEFIELD "Last1" }" "{ MERGEFIELD "Last1" } & { MERGEFIELD "First2" } {

MERGEFIELD "Last2" }"} }



Here is the logic, which may help you understand the formula.

1. Insert "First1 "

2. If Last2 is blank, then insert "Last1".

3. If Last2 equals Last1 then insert "& First2 Last1"

4. Else Insert "Last1 & First2 Last2"



Hope this helps you out!



Kind regards

Stuart

Sydney, AUSTRALIA



"djackola" wrote in message
...
I have a spreadsheet with the following column headings

Last1 First1 Last2 First2 Address City State Zip
Smith John Jones Mary 123 Main St Anywhere NC 27777

I have the Block Address selected which would make the label

John Smith and Mary Jones
123 Main St
Anywhere, NC 27777

These labels as well as John and Mary Smith (when spouse has same last
name)
are coming out fine. The problem is that if any entry on my Excel list is
for John Smith ONLY, the label is coming out "The Smith Family".

How can I make it come out as John Smith on my Word label?

thanks...
Dee