Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
John Tesler
 
Posts: n/a
Default Trouble with Mail Merge

Hi guys

I'm quite new to mail merge, and have been having some trouble for days now.
I've found numerous examples on the Internet, and have had some success, but
cannot complete the solution.

I have a small (fixed number of 12 records) and simple Excel database. Each
row is a new record. Let's just say each record has a person's name and
their favourite colour.

What I want to do is, in Word, say:

"The following people's favourite colour is blue: John and Tim."
"The following people's favourite colour is green: Tony and Bill."
etc etc

I want to achieve this by cycling through the database, finding the people's
records that contain "blue", and write down their forename. Sounds pretty
simple, but the problem is that there are several people who have different
favourite colours, and the records are in no order.

Firstly, I tried something like this:


The following people's favourite colour is blue: { IF {MERGEFIELD Colour } =
"Blue" { MERGEFIELD "Name" } "" }{ NEXT }

etc etc



This works absolutely fine, and inserts the correct names. However, when I
come to the next colour, green, it doesn't work (I assume because I have
come to the end of the database?).



I then thought I'd try setting bookmarks then referring to them later once
they've been stored. For argument's sake, let's say there will always be 2
people that like the same colour; no more and no less.



So I did something like this:



{ SET blue { IF { MERGEFIELD Colour } = "Blue" { MERGEFIELD "Name" }
"" } }{ NEXT }{ SET blue { IF { MERGEFIELD Colour } = "Blue" { MERGEFIELD
"Name" } "" } }



The problem here is that the bookmark gets overwritten by the second name
and also it doesn't solve the problem of storing names for each colour!

I'm in a real helpless position and don't know what else to try! Any help
would be much appreciated. Many thanks in advance.


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Charles Kenyon
 
Posts: n/a
Default Trouble with Mail Merge

I don't think you can do exactly what you want but you may be able to come
close to it using a directory or catelog type merge. I would recommend
looking at Cindy Meister's web sight for ideas.
http://homepage.swissonline.ch/cindy...r/MergFram.htm

Here are a few links to some other mailmerge resources:
http://word.mvps.org/FAQs/index.htm
http://addbalance.com/usersguide/mailmerge.htm
http://addbalance.com/word/wordwebresources.htm#Fields

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"John Tesler" wrote in message
...
Hi guys

I'm quite new to mail merge, and have been having some trouble for days
now. I've found numerous examples on the Internet, and have had some
success, but cannot complete the solution.

I have a small (fixed number of 12 records) and simple Excel database.
Each row is a new record. Let's just say each record has a person's name
and their favourite colour.

What I want to do is, in Word, say:

"The following people's favourite colour is blue: John and Tim."
"The following people's favourite colour is green: Tony and Bill."
etc etc

I want to achieve this by cycling through the database, finding the
people's records that contain "blue", and write down their forename.
Sounds pretty simple, but the problem is that there are several people who
have different favourite colours, and the records are in no order.

Firstly, I tried something like this:


The following people's favourite colour is blue: { IF {MERGEFIELD Colour }
= "Blue" { MERGEFIELD "Name" } "" }{ NEXT }

etc etc



This works absolutely fine, and inserts the correct names. However, when I
come to the next colour, green, it doesn't work (I assume because I have
come to the end of the database?).



I then thought I'd try setting bookmarks then referring to them later once
they've been stored. For argument's sake, let's say there will always be 2
people that like the same colour; no more and no less.



So I did something like this:



{ SET blue { IF { MERGEFIELD Colour } = "Blue" { MERGEFIELD "Name" }
"" } }{ NEXT }{ SET blue { IF { MERGEFIELD Colour } = "Blue" { MERGEFIELD
"Name" } "" } }



The problem here is that the bookmark gets overwritten by the second name
and also it doesn't solve the problem of storing names for each colour!

I'm in a real helpless position and don't know what else to try! Any help
would be much appreciated. Many thanks in advance.




  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Trouble with Mail Merge

You are trying to perform a "multiple items per condition (=key field)"
mailmerge which Word does not really have the ability to do:

See the "Group Multiple items for a single condition" item on fellow MVP
Cindy Meister's website at

http://homepage.swissonline.ch/cindy...faq1.htm#DBPic


Or take a look at the following Knowledge Base Article

http://support.microsoft.com/default...b;en-us;211303

--
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

"John Tesler" wrote in message
...
Hi guys

I'm quite new to mail merge, and have been having some trouble for days
now. I've found numerous examples on the Internet, and have had some
success, but cannot complete the solution.

I have a small (fixed number of 12 records) and simple Excel database.
Each row is a new record. Let's just say each record has a person's name
and their favourite colour.

What I want to do is, in Word, say:

"The following people's favourite colour is blue: John and Tim."
"The following people's favourite colour is green: Tony and Bill."
etc etc

I want to achieve this by cycling through the database, finding the
people's records that contain "blue", and write down their forename.
Sounds pretty simple, but the problem is that there are several people who
have different favourite colours, and the records are in no order.

Firstly, I tried something like this:


The following people's favourite colour is blue: { IF {MERGEFIELD Colour }
= "Blue" { MERGEFIELD "Name" } "" }{ NEXT }

etc etc



This works absolutely fine, and inserts the correct names. However, when I
come to the next colour, green, it doesn't work (I assume because I have
come to the end of the database?).



I then thought I'd try setting bookmarks then referring to them later once
they've been stored. For argument's sake, let's say there will always be 2
people that like the same colour; no more and no less.



So I did something like this:



{ SET blue { IF { MERGEFIELD Colour } = "Blue" { MERGEFIELD "Name" }
"" } }{ NEXT }{ SET blue { IF { MERGEFIELD Colour } = "Blue" { MERGEFIELD
"Name" } "" } }



The problem here is that the bookmark gets overwritten by the second name
and also it doesn't solve the problem of storing names for each colour!

I'm in a real helpless position and don't know what else to try! Any help
would be much appreciated. Many thanks in advance.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
John Tesler
 
Posts: n/a
Default Trouble with Mail Merge

Thanks for the replies everyone. I'll check out the provided links and give
it a go, and post back. :-)


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
Tent Card Mail Merge Trouble shogan Mailmerge 4 January 11th 06 04:26 PM
having trouble with edit (using mail merge, cannot format my list karkwot (car quote) Mailmerge 1 December 30th 05 02:05 AM
trouble with mail merge autoxer Mailmerge 1 April 15th 05 10:32 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Weird trouble with Word mail merge BetsyR Mailmerge 5 January 21st 05 01:48 AM


All times are GMT +1. The time now is 04:45 AM.

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"