A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Formatting Long Documents
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculate running total and print in footer/header



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 1st, 2009, 04:11 PM posted to microsoft.public.word.formatting.longdocs
StefanM
external usenet poster
 
Posts: 4
Default Calculate running total and print in footer/header

Hi again,

now that my first problem is solved, maybe someone can help me with
another problem. I need to print a running total at the bottom of each
page (except last page) and at the top of all but the first page. The
document gets filled via ActiveX interface to Word by my program. It
sends a variable numer of invoice items to Word (using one autotext
field as "marker" to insert an item line before the field, so that the
autotext field always stays at the bottom of the invoice items already
inserted into the document).

I created a sample document with a table and played a bit with Word's
functionality on how to calculate a running total.

One way seems to be using a table and "SUM(ABOVE)" to calculate the
"PageTotal" and a series of SET statements to store the page and
document totals in "variables" (don't know if "{ SET PageTotal { = SUM
(ABOVE) } }" is what you would call a variable in Word).

However you cannot use the values of these "variables" in the page
footer/header as on following pages only the values from the first
page footer appears. Thus the page footer seems to be "static" and not
dynamic using the current values of the variables.

So bottom line is: I can't really use these features because they
don't work the way I expected them to work. Up to now my solution
would be to "inject" a line with the running total, a page break and
repeat the running total on top of the next page before sending the
next invoice item line.

Even when using a table and SUM(ABOVE) I would have to injevt these
"sum" lines and page breaks in my table.

Is there any other solution I'm currently not aware off?

Thanks,
Stefan
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.