#  Other Applications & Softwares  > Word Formatting & General >  > [SOLVED] Directory Mail Merge

## Carrol

Dear all,

I have to mail merge a customer list in excel in which the names will vary according to each region.  I knew this has to be accomplished via directory mail merge.  However, I am a novice and do not know how to achieve it.



1. Region   
2. am customer name   
3. am customer title    
4. pm customer name     
5. pm customer title  

The original data comes in by one region one row with the above append across different columns.  Due to the format of a directory, I think I have to convert them into the one as attached first.

The above are the headings of a table with the text in the region column to be a merged cell.  I have tried to use the field codes but the names under one region would separate into different pages under the existing codes.  Please advise.  Thanks!

----------


## macropod

To see how to do so with any mailmerge data source supported by Word, check out my *Microsoft Word Catalogue/Directory Mailmerge Tutorial* at:
http://www.msofficeforums.com/mail-m...-tutorial.html 
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.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.

Depending on what you're trying to achieve, the field coding for this can be 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:
http://www.msofficeforums.com/mail-m...html#post23345
http://www.msofficeforums.com/mail-m...html#post30327 

Another option would be to use a DATABASE field in a normal ‘letter’ mailmerge main document and a macro to drive the process. An outline of this approach can be found at: http://answers.microsoft.com/en-us/o...1-1996c14dca5d

Conversely, if you create a new worksheet in your Excel workbook with a separate table containing just a single instance of each of the grouping criteria (e.g. Region), a DATABASE field in a normal ‘letter’ mailmerge main document could be used without the need for a macro. An outline of this approach can be found at:
https://answers.microsoft.com/en-us/...f-8642e46fa103 
For a working example, see:
http://www.msofficeforums.com/mail-m...-multiple.html

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 https://onedrive.live.com/?cid=5AEDC...43615E886B!566

----------


## Carrol

Dear all,

The issue is solved by using Directory mail merge, there is no need to reformat the source data, one region one record.  Then have to use delete blanks macro to delete the blank rows as below.




```
Please Login or Register  to view this content.
```

----------


## macropod

If you used the directory merge instructions in my tutorial, there would be no blank rows to delete.

----------


## Carrol

Dear Macropod,

I did read your tutorial but I am not sure how it could be applied.  

My task is as follows:

A grid Word table containing:
First column: Organisation name (as a merged cell of 5 rows)
2nd & 3rd: Name and title of 1st event (Up to 5 persons)
4th & 5th: Name and title of 2nd event (Up to 5 persons)

Hence when I did the mail merge, there were always 5 rows for each organization, although there is just one attendee for some of the organisations, hence 4 blank rows.  Hence I used the macro above to delete the blank rows.

Thanks for your advice.

----------


## macropod

The tutorial shows how to create tables whose row count varies according to the number of records per group. There's a whole section on that topic.

----------

