Directory Mail Merge with table layout

3

3N1GM4

Hi all

I am trying to perform a Directory type Mail Merge from Excel into Wor
where the data being referenced in Excel has repeated values in on
column which I effectively want to group on so that I produce on
document per value in that column instead of one column per record i
the range

The Directory Mail Merge option seems to work perfectly for this and b
following some instructions online I have been able to successfully ge
the merge to work

However, I have one final layout issue which is bugging me and I can'
seem to get it to work properly. If I give a simplified example of wha
I am doing, perhaps this will make more sense

Say I have the following data in my Excel sheet in the range which i
being specified in my Mail Merge

Code
-------------------
Customer Site Item Charge1 Charge2 Charge
-------- ---- ---- ------- ------- ------
Customer 1 Little Place Widget 45.00 75.00 95.00
Customer 1 Medium Road Widget 40.00 70.00 98.00
Customer 1 Medium Road Thing 48.00 76.00 92.00
Customer B Red Street Widget 35.00 72.00 90.00
Customer B Blue Avenue Widget 42.00 78.00 87.00
Customer B Blue Avenue Thing 41.00 68.00 85.00
Customer B Green Drive Widget 38.00 65.00 91.00
Customer $ Square Crescent Widget 39.00 62.00 90.00
Customer $ Circle Way Widget 34.00 60.00 96.00
-------------------

I then have my Word document set up to mail merge based on this range
using the following merge code

[image
http://i1083.photobucket.com/albums/j390/x3N1GM4x/Template.png

So effectively I check to see if I am merging the first item in th
merge sequence, outputting the start of a letter if I am, which contain
the Dear [x] line and the table header row

Then I use some logic to determine whether to output the next recor
from the data source range as a row in the table or to end the lette
and start the next one. In this way I should end up with one documen
per Customer, each with a list of their records from the Excel range
like this

[image
http://i1083.photobucket.com/albums/j390/x3N1GM4x/Correct.png

However, what I actually end up with is something like this

[image
http://i1083.photobucket.com/albums/j390/x3N1GM4x/Incorrect.png

So is there any way to get this to actually display in a table properly
I have tried moving the closing/terminating double quote at the end o
each table row into the final cell on that row, but this breaks th
merge entirely, so I cannot see how I can get this to work

Any suggestions would be most welcome
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
578
Reaction score
50
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:
http://lounge.windowssecrets.com/index.php?showtopic=731107
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.

For a recent, worked example, see the attachment to post #13 at: mail merge with duplicate names but different dollar amounts
 
R

Reinaldo123

I am having the same problem.

Your post doesn't show the pilcro/paragraph mark that is in front o
your table but that is what is causing the problem of a space occurrin
between rows. I've tried to remove the paragraph mark but then tha
throws the opening double quote lines into the table itself where it
becomes no longer a part of the mailmerge statement but a character i
the table.

My end result then becomes only the first table in a category duplicate
with the double quote lines showing up in the first cell of th
duplicate table.

I see no one has replied to your question. Did you ever find a solutio
to this as I can't figure out any.

Reinaldo

3N1GM4;491847 said:
Hi all,

I am trying to perform a Directory type Mail Merge from Excel into Wor
where the data being referenced in Excel has repeated values in on
column which I effectively want to group on so that I produce on
document per value in that column instead of one column per record i
the range.

The Directory Mail Merge option seems to work perfectly for this and b
following some instructions online I have been able to successfully ge
the merge to work.

However, I have one final layout issue which is bugging me and I can'
seem to get it to work properly. If I give a simplified example of wha
I am doing, perhaps this will make more sense.

Say I have the following data in my Excel sheet in the range which i
being specified in my Mail Merge:
Code
-------------------
Customer Site Item Charge1 Charge2 Charge3
-------- ---- ---- ------- ------- -------
Customer 1 Little Place Widget 45.00 75.00 95.00
Customer 1 Medium Road Widget 40.00 70.00 98.00
Customer 1 Medium Road Thing 48.00 76.00 92.00
Customer B Red Street Widget 35.00 72.00 90.00
Customer B Blue Avenue Widget 42.00 78.00 87.00
Customer B Blue Avenue Thing 41.00 68.00 85.00
Customer B Green Drive Widget 38.00 65.00 91.00
Customer $ Square Crescent Widget 39.00 62.00 90.00
Customer $ Circle Way Widget 34.00 60.00 96.00 -------------------
I then have my Word document set up to mail merge based on this range
using the following merge code:

[image
http://i1083.photobucket.com/albums/j390/x3N1GM4x/Template.png]

So effectively I check to see if I am merging the first item in th
merge sequence, outputting the start of a letter if I am, whic
contains the Dear [x] line and the table header row.

Then I use some logic to determine whether to output the next recor
from the data source range as a row in the table or to end the lette
and start the next one. In this way I should end up with one documen
per Customer, each with a list of their records from the Excel range
like this:

[image
http://i1083.photobucket.com/albums/j390/x3N1GM4x/Correct.png]

However, what I actually end up with is something like this:

[image
http://i1083.photobucket.com/albums/j390/x3N1GM4x/Incorrect.png]

So is there any way to get this to actually display in a tabl
properly? I have tried moving the closing/terminating double quote a
the end of each table row into the final cell on that row, but thi
breaks the merge entirely, so I cannot see how I can get this t
work.

Any suggestions would be most welcome
 

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