Suppress/Delete Blank Rows

M

Mike

I have a mail merge set up in a word table. Each cell has
a mail merge field. I have a table with 25 rows and
sometimes it is not always filled. So what I want to do is
suppress/delete those empty rows in the table because I
have text under the table that I would like moved under
the last record. Currently nothing prints in the cells
but the rows still stay there and since I hide the
gridlines it looks like a blank half page.
Any help on how to delete these empty rows would be great.
Thanks,Mike
 
P

Peter Jamieson

If you can use field content to test which is the last row to have anything
in it, you could create 25 versions of your table (one with one row, one
with two rows, etc.) and nest them inside IF fields. e.g.

{ SET inserted "N" }
{ IF "{ MERGEFIELD row2field }" = "" "{ SET inserted "Y" }then insert the
row 2 table here" ""
}{ IF { REF inserted } = "N"
"{ IF "{ MERGEFIELD row3field }" = "" "{ SET inserted "Y" }then insert the
row 3 table here" "" }" ""
}{ IF { REF inserted } = "N"
"{ IF "{ MERGEFIELD row4field }" = "" "{ SET inserted "Y" }then insert the
row 4 table here" "" }" ""
}

etc.
 
C

Cindy M -WordMVP-

Hi Mike,

Hmmmm. It would be interesting to know how this data source
is set up. The end result you want sounds more like something
for a DATABASE field. Are you trying for a one-to-many
display listing?

Based only on the little you tell us, I'd say you'd need - at
the very least - to use TABs to create the "table", nested in
IF fields to suppress the line if a certain merge field is
empty. But I still think a DATABASE field is probably the
better solution.
I have a mail merge set up in a word table. Each cell has
a mail merge field. I have a table with 25 rows and
sometimes it is not always filled. So what I want to do is
suppress/delete those empty rows in the table because I
have text under the table that I would like moved under
the last record. Currently nothing prints in the cells
but the rows still stay there and since I hide the
gridlines it looks like a blank half page.
Any help on how to delete these empty rows would be great.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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