Excel to MS Word Mail Merge - how to create multiple directories broken up by a field category

susaneey

New Member
Joined
May 22, 2017
Messages
3
I have a mail merge directory that i've created using MS Word, which pulls data from an excel spreadsheet of project team itineraries. The data is constantly being updated - people quit, locations close, people run over schedule at a stop on the list, and so the reports need to be constantly reprinted.

Does anyone have suggestions for how I might set up the merge to create multiple itineraries broken down by a specific field category - in this case, the team name?

For this example, I might have a hundred locations that get assigned to one of six teams - I want to generate six itineraries with only the dates and locations relevant to each team.

A second problem I have is that the number of rows I need for each directory varies - some teams have more locations assigned to them than others. The spreadsheet data is being constantly changed, and one type of change that sometimes happens is a location gets deleted - so even within team paths, the number of locations could go up or down at any given time.

If there is a better approach to this than using MS Word, I'd also love to hear your thoughts! Thank you.

6bcSDHK.png
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You can use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
Microsoft Word Catalogue/Directory Mailmerge Tutorial | Windows Secrets Lounge
or:
http://www.gmayor.com/Zips/Catalogue Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

The field coding for this is complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
mail merge with duplicate names but different dollar amounts
Access to Word, Creating a list from multiple records
Word 2010 Merge from excel into Table Directory | Windows Secrets Lounge

Another option would be to use a DATABASE field in a normal ‘letter’ mailmerge main document and a macro to drive the process. An example of this approach can be found at: http://answers.microsoft.com/en-us/...g-tables/8bce1798-fbe8-41f9-a121-1996c14dca5d
The DATABASE field can even be used without recourse to a mailmerge. An example of such usage can be found at: Mail merge into different coloumns

Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at http://bit.ly/1hduSCB
 
Upvote 0
susaneey,

If there is a better approach to this than using MS Word, I'd also love to hear your thoughts!
The sample Word doc looks a lot like an Excel table, so you might consider "extracting" data to a PivotTable - actually six of them, one for each team. Whenever the data changes just click the Refresh button and all the PivotTables will update.

Cheers,

tonyyy
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top