Need help creating a list sorted by category in Word

M

mike.j.gerard

Hi all....

I'm trying to create a list of children to be picked up by parents. A
single parent may pick up one or more than one child.

I tried following the mail merge instructions on
http://support.microsoft.com/kb/294686/

And did this....

{IF{MERGESEQ} = "1" ""
"{MERGEFIELD "PickUp_Person"} "}

{SET Parent1 {MERGEFIELD "PickUp_Person"} }

{IF {Parent2}<>{Parent1} "First Child to be picked up: {MERGEFIELD
Name_First} {MERGEFIELD Name_Last}"

"Second child {MERGEFIELD Name_First} {MERGEFIELD Name_Last}" }

{SET Parent2 {MERGEFIELD "PickUp_Person"} }


I always get condition two (Parent2 = Parent 1).
So it shows the parent and "Second child xyz"
Then the next record again shows the same second parent and a new
"Second child abc"

I'm missing something simple here but can't seem to find it...
Any help would be appreciated.

Thanks,
Mike
 
M

mike.j.gerard

Hi macropod

I tried using your tutorial and I'm having the same problem I had with
my example. That is, if I take some code that should produce all the
text on one page I get the first record on one page (city one,
representative one) then on the next page I get the next record (city
one, representative two), even though they should be on the same
page.

Page one
These are the sales totals for ACT
City Representative Sales
Canberra Yang $2,100.00

Page two
These are the sales totals for NSW
City Representative Sales
Coffs Harbour Roulston $4,000.00


Page three
Dubbo Kristiansen $6,700.00

Page four
Newcastle Avard $3,400.00


I made sure not to add the Quote 12 text or any other text to the mail
merge.

What am I doing wrong here?


Thanks,
Mike
 
P

Peter Jamieson

Your Mailmerge main document needs to be set up as a "Directory"
("Catalog" in old versions of Word). If it is set up as "Letters" you
will get a section break after every record which will typically cause a
page break.

Peter Jamieson

http://tips.pjmsn.me.uk
 
M

mike.j.gerard

Your Mailmerge main document needs to be set up as a "Directory"
("Catalog" in old versions of Word). If it is set up as "Letters" you
will get a section break after every record which will typically cause a
page break.

Peter Jamieson


Thanks Peter....that was it. I was setting it up as a letter. I went
back to my original "problem" document and merged it as a directory
and then it was fine.

It's always the little things that get you!

Thanks again,

Mike
 
D

Doug Robbins - Word MVP on news.microsoft.com

And, when they do, the first thing to do is RTM.

--
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, originally posted via msnews.microsoft.com
 
D

DivaJ9

This actually helped with a project I've spent days trying to complete.
ONE more thing though, I'd like to send the merged pages via email. When I
try I get an error stating "You cannot send a catalog created by merging
documents directly to mail, fax,, or a printer.

So what now? I want to send each Manager a list of employees associated. ???
 
D

Doug Robbins - Word MVP on news.microsoft.com

You will need to split the document that is produced into individual
documents. If data for each manager is only one page in length, the
following macro could be used to split it.

Sub splitter()
'
' splitter Macro
' Macro created 16-08-98 by Doug Robbins to save each page of a document
' as a separate file with the name Page#.DOC
'
Dim Counter As Long, Source As Document, Target As Document
Set Source = ActiveDocument
Selection.HomeKey Unit:=wdStory
Pages = Source.BuiltInDocumentProperties(wdPropertyPages)
Counter = 0
While Counter < Pages
Counter = Counter + 1
DocName = "Page" & Format(Counter)
Source.Bookmarks("\Page").Range.Cut
Set Target = Documents.Add
Target.Range.Paste
Target.SaveAs FileName:=DocName
Target.Close
Wend
End Sub

After having split it, for the emailing part, see the article "Mail Merge to
E-mail with Attachments" at:

http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm

--
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, originally posted via msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top