Using Tables in Mail Merges - how do I surpress empty rows?

R

R

I'm running a maiil merge which is bringing in data from excel.

I'm producing a mailing which will be a sort of statement for people
contained in the data.

I've set up a table on one of the pages which contains information about
their funds ie:
Fund Name Percentage
<<Fund Name1>> <<FundRate1>>
<<Fund Name2>> <<FundRate2>>
<<Fund Name 3>> <<Fund Rate3>>... etc.

Each field is in it's own cell and each row is in a seperate row within the
table.

The maximum number of rows I will need is 10 but the problem I have is that
when someone has less than 10 rows of data, I end up with lots of empty rows.
Is there a way I can surpress table rows that don't contain data?


Thanks,

R
 
D

Doug Robbins - Word MVP

What you are trying to do is a "multiple items per condition (=key field)"
mailmerge which Word does not really have the ability to do out-of-the box.

You can however do it by following the method on the following website:

http://cornell.veplan.net/article.aspx?&a=3815



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
R

Rich/rerat

R,
If you data source is an Excel sheet, is formatted similar to this:

Client Name Address FundName1 FundRate1 FundName2 FundRate2 ==>FundName10
FundRate10, etc...

"Client Name" field can be broken up in two (2) fields such as <<First
Name>> <<Last Name>>.
"Address" Field can be broken up in multiple fields such as <<Street>>
<<City>> <<State>> <<Zip>>

Create a Word document like this. I am using for this sample the simplest
field set up for Client Name and Address:

Your Company Header

<<Client Name>>
<< Address>>

**Text for your letter**

Then create a table with 2X2 Table:

1. First Row/First Column Type: "Fund Name"
2. First Row/2nd Column Type: "Fund Percentages"
3. In the 2nd Row/1st Column Insert from the Data Source:

<<FundName1>> <Enter>
<<FundName2>> <Enter>
<<FundName3>> <Enter>
Etc.....

4. In the 2nd Row/2nd Column Insert from the Data Source:

<<Fund Rate1>> <Enter>
<<Fund Rate2>> <Enter>
<<Fund Rate3>> <Enter>
Etc.....

This will leave a single blank line at the bottom of the table in Row #2, if
your client does no have 10 funds, which will be unnoticed, if you remove
the borders around the table.

Or create a table with 3X2 Table:

1. First Row/First Column Type: "Fund Name"
2. First Row/2nd Column Type: "Fund Percentages"
3. 2nd Row/Column "Empty" to provide space between header of the table and
the data in the table.
4. In the 3rd Row/1st Column Insert from the Data Source:

<<FundName1>> <Enter>
<<FundName2>> <Enter>
<<FundName3>> <Enter>
Etc.....

5. In the 3rd Row/2nd Column Insert from the Data Source:

<<Fund Rate1>> <Enter>
<<Fund Rate2>> <Enter>
<<Fund Rate3>> <Enter>
Etc.....

This will leave a single blank line at the bottom of the table in Row #3, if
your client does no have 10 funds, which will be unnoticed, if you remove
the borders around the table.

Sincerely Yours,
Your Signature



--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat (RRR News) <message rule>
<<Previous Text Snipped to Save Bandwidth When Appropriate>>


I'm running a maiil merge which is bringing in data from excel.

I'm producing a mailing which will be a sort of statement for people
contained in the data.

I've set up a table on one of the pages which contains information about
their funds ie:
Fund Name Percentage
<<Fund Name1>> <<FundRate1>>
<<Fund Name2>> <<FundRate2>>
<<Fund Name 3>> <<Fund Rate3>>... etc.

Each field is in it's own cell and each row is in a seperate row within the
table.

The maximum number of rows I will need is 10 but the problem I have is that
when someone has less than 10 rows of data, I end up with lots of empty
rows.
Is there a way I can surpress table rows that don't contain data?


Thanks,

R
 
R

R

Thanks Rich.

I started doing it this way in the beginning. Just means it's difficult to
put lines between the funds if needed - they all appear in one box.

I managed to get round this by formatting the fields in a style I created
with a rule above the type. So it looks like a table but actually the
gridlines are part of the paragraph styling.

It looks okay - I'm just tweaking it at the moment.

I think I'm pretty clever at the moment but I'm yet to do the full merge so
watch this space and I'll tell you if it really worked.

R
 
D

Doug Robbins - Word MVP

That will not work in the way that the OP desires. If there are only two
funds for one record, the second row of the table will contain

FundName1¶ FundRate1¶
FundName2¶ FundRate2¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶

The OP wants to avoid having all of the

¶ ¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶
¶ ¶

The OP needs to tell us how the data is arranged in Excel. If there is a
row of data for each fund, then he will have to use a method similar to that
which I posted. If there is only one row of data with individual fields for
each fund and its rate, then he will have to use a series of
If...then...Else field constructions.




--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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