How to use mail merge to create a list sorted by category in Word 2007

eossma
eossma used Ask the Experts™
on
I have an Excel spreadsheet with 135 records.  Headings are:
Name, PersonalTimesBalance, VacationBalance, ReportsToName, e-mail, PreferredName

The last field, PreferredName is the key field the merge will be based on, AND grouped on.

Attached is the merge code, but when I click the "Preview Results" button, it's not grouping on the PreferredName; the record row under the table (in second image) should list 5 additional records for the PreferredName(which =Larry); the mailmerge record selector indicates 135 records as well.

What am I doing wrong with my code that it's only pulling 1 record on the PreferredName?
 Merge code Merge result based on code
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
GrahamSkanRetired
Top Expert 2012

Commented:
Just to check, the records are sorted so that all the Larrys, etc are together?

It would help to post the main document and a sample spreadsheet. It's rather difficult working from a picture.

Author

Commented:
Correct.  All of Larry's people should be posted below, but it's only pulling the first record.
Book2.xlsx

Author

Commented:
Someone please help . . . I really need to get this to happen and I really haven't heard anything!
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

GrahamSkanRetired
Top Expert 2012

Commented:
Sorry. I ran out of time and enthusiasm trying to recreate your main document from a rather fuzzy picture.

 Is it possible that you could post that (censored if necessary)?

Author

Commented:
I'm not sure what you mean . . . I attached graphics that were quite clear.
Retired
Top Expert 2012
Commented:
I have spent a few hours on trying to get this to work. I've simplified the document, but it should show the idea.




MergeDoc.JPG
Page1.JPG
Page-2.JPG

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial