Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / September 2006

Tip: Looking for answers? Try searching our database.

Condition mail merge on 2 fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TonyN - 20 Sep 2006 19:49 GMT
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?
Doug Robbins - Word MVP - 21 Sep 2006 04:48 GMT
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.

Signature

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

>I need to merge a txt file with fileds that include company, firstname, and
> lastname (there are other fields in the merge data).
[quoted text clipped - 14 lines]
>
> How do i do this?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.