Hi Maranello,
> The problem is that my table with data can
> grow up to several pages. What is the best thing to do? Create a VBA
> procedure that makes a field in the footer? In this field I could place
> a large VBA statement with refers to the last cell of the table on that
> page? But how do I know what the last cell on every page is? Can this
> be done without looping through the table?
The approach you describe with showing the information in the footer can
only be done in Word using what's called a StyleRef field. But the actual
result you want to see must already be present in the body of the document,
which brings us full circle.
so, yes, the only choice you'd have would be to loop through the table. I
guess the approach I'd try would be to go down the rows, checking the
.Information property for the range until it goes to the next page. I'd
then go back up two rows, SPLIT the table, insert a row, and insert the
total. Then go to the next table (the split one), that should be starting
on the next page, and repeat.
> > Im working on a mail merge invoice in Word. All the rows with articles
> > are in a huge table. When there are more then one pages then there
[quoted text clipped - 7 lines]
> you. What you ask would be possible using a macro (VBA) on the merge
> result document.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :-)