Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Condition mail merge on 2 fields
I need to merge a txt file with fileds that include company, firstname, and
lastname (there are other fields in the merge data). The data souce automatically puts together firstname+lastname into the field company, for people who don't have a company name entered. I can't change that. So, when I merge the data, the name prints out twice for those whose companyname was a merged firstname+" "+lastname. I tried something like: {IF {MERGEFIELD firstname} = {MERGEFIELD company} "----------" {MERGEFIELD company} But I think I need to define firstnam+" "+lastname to compare to company. How do i do this? |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Condition mail merge on 2 fields
What do you mean by "The data souce automatically puts together
firstname+lastname into the field company?" You mean that the firstname + lastname is automatically repeated in those fields in the data source as well as in separate firstname and lastname fields? If that is the case, your field construction should be something like {IF {MERGEFIELD company} "{MERGEFIELD firstname} {MERGEFIELD lastname}" "{MERGEFIELD company } Cr { MERGEFIELD nextmergefield }" "{MERGEFIELD nextmergefield}" } where you insert a carriage return (Press Enter or Shift+Enter) where Cr appears in the above. -- 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 "TonyN" wrote in message news I need to merge a txt file with fileds that include company, firstname, and lastname (there are other fields in the merge data). The data souce automatically puts together firstname+lastname into the field company, for people who don't have a company name entered. I can't change that. So, when I merge the data, the name prints out twice for those whose companyname was a merged firstname+" "+lastname. I tried something like: {IF {MERGEFIELD firstname} = {MERGEFIELD company} "----------" {MERGEFIELD company} But I think I need to define firstnam+" "+lastname to compare to company. How do i do this? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge fields merge with different formatting | Microsoft Word Help | |||
Mail Merge Numeric Merge Fields | Mailmerge | |||
Mail merge - use specific fields in the contacts folder to customi | Mailmerge | |||
mail merge with attachments | Mailmerge | |||
Splitting text from mail merge fields | Mailmerge |