Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2004

Tip: Looking for answers? Try searching our database.

Remove Rows from a Table after merging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin L - 08 Nov 2004 15:25 GMT
Hello,
I have a table in a word document that contains merge fields. If the merge
fields contain no data in them, they do not print.
I would like to apply the same functionality to the table itself by
eliminating the table row.

Is there a way to remove a row from a table if the cells in the row contain
no data?

I am using Visual Basic .NET to open the Word Document, perform the merge
action and print the merged documents.

I am using Word XP.

Thank you.
Cindy M  -WordMVP- - 11 Nov 2004 13:21 GMT
Hi Kevin,

No, there's nothing in Word that would do this. But why not FILTER the data so
that the data row simply isn't processed by the merge?

> I have a table in a word document that contains merge fields. If the merge
> fields contain no data in them, they do not print.
[quoted text clipped - 6 lines]
> I am using Visual Basic .NET to open the Word Document, perform the merge
> action and print the merged documents.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Kevin L - 08 Dec 2004 22:21 GMT
Hi Cindy,
The datarow from the merge isn't the problem.
The problem is that I want to display the results of the merge in a table.
Since I cannot add (or delete) Table rows dynamically to match the merge
(that I know of), I am stuck with having a fixed set of Table Rows. Which
means that I will have blanks rows when there is not enough data from the
merge to fill them all.

> Hi Kevin,
>
[quoted text clipped - 22 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Cindy M  -WordMVP- - 09 Dec 2004 11:13 GMT
Hi Kevin,

> The datarow from the merge isn't the problem.
> The problem is that I want to display the results of the merge in a table.
> Since I cannot add (or delete) Table rows dynamically to match the merge
> (that I know of), I am stuck with having a fixed set of Table Rows. Which
> means that I will have blanks rows when there is not enough data from the
> merge to fill them all.

Set up a single table row and insert the merge fields. Nothing else in the
document.

Set the main merge document type as DIRECTORY. Now execute the merge to a new
document. You'll get a table row for each record

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.