Page total

M

maranello

Hello,

I hope this is the right place to post my question.

I’m working on a mail merge invoice in Word. All the rows with article
are in a huge table. When there are more then one pages then ther
should be a page total on every page (a running page total). This i
not possible with a sum(above) formula. I’ll need to specify the righ
rows on each page. It is possible on a dynamic way?
How can I see which rows are on the same page?

Any help in this regards would be most appreciated.

Theo Postm
 
C

Cindy M -WordMVP-

Hi Maranello,
I’m 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
should be a page total on every page (a running page total). This is
not possible with a sum(above) formula. I’ll need to specify the right
rows on each page. It is possible on a dynamic way?
How can I see which rows are on the same page?
Generally, Word cannot do anything like this. It's a word processor, not
a worksheet program, so there are just certain things it won't do for
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 :)
 
M

maranello

Hello,

Thank you for your reply. The problem is that my table with data ca
grow up to several pages. What is the best thing to do? Create a VB
procedure that makes a field in the footer? In this field I could plac
a large VBA statement with refers to the last cell of the table on tha
page? But how do I know what the last cell on every page is? Can thi
be done without looping through the table?

Thank
 
C

Cindy M -WordMVP-

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.
Generally, Word cannot do anything like this. It's a word processor, not
a worksheet program, so there are just certain things it won't do for
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 :)
 

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