Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
TonyN TonyN is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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

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 fields merge with different formatting KP Microsoft Word Help 1 February 22nd 06 12:01 PM
Mail Merge Numeric Merge Fields Patti - Hexagon Mailmerge 7 December 5th 05 01:28 PM
Mail merge - use specific fields in the contacts folder to customi Rachelle Mailmerge 1 November 29th 05 01:49 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Splitting text from mail merge fields Mark Ainsworth Mailmerge 1 March 29th 05 08:34 PM


All times are GMT +1. The time now is 01:15 PM.

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"