Reply
 
Thread Tools Display Modes
  #1   Report Post  
3N1GM4 3N1GM4 is offline
Junior Member
 
Posts: 1
Default Directory Mail Merge with table layout

Hi all,

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

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

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

Say I have the following data in my Excel sheet in the range which is 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:


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

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


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


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 of each table row into the final cell on that row, but this breaks the merge entirely, so I cannot see how I can get this to work.

Any suggestions would be most welcome!

Last edited by 3N1GM4 : February 7th 12 at 02:39 PM
  #2   Report Post  
Reinaldo123 Reinaldo123 is offline
Junior Member
 
Posts: 1
Default

I am having the same problem.

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

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

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

Reinaldo

Quote:
Originally Posted by 3N1GM4 View Post
Hi all,

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

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

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

Say I have the following data in my Excel sheet in the range which is 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:


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

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


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


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 of each table row into the final cell on that row, but this breaks the merge entirely, so I cannot see how I can get this to work.

Any suggestions would be most welcome!
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Table of Contents inside a Directory Mail Merge odudley Mailmerge 3 January 30th 14 03:22 PM
mail merge directory OfficePeterson Mailmerge 3 July 21st 09 07:09 AM
Mail Merge directory Bill Minimum Mailmerge 3 June 23rd 08 10:01 PM
Mail Merge - Directory Dee Mailmerge 2 May 24th 06 01:23 AM
Create a directory table in word using mail merge katamy Mailmerge 1 August 24th 05 06:56 PM


All times are GMT +1. The time now is 10:23 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"