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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do you calculate totals in Word 2000?
Would like to know if it is possible and if so how to automatically calculate
the totals for a time card template. |
#2
|
|||
|
|||
CheifNewB,
To automate the calculation you will need to set up your template as a protected form. You should get a good start here and the linked articles by Dian Chapman: http://word.mvps.org/faqs/customizat...nTheBlanks.htm You can semi-automate calculations using formula fields and then updating the fields. Let's say the hours worked are in a column. At the bottom put the field {=sum(above)}. The field code braces { } are entered with CTRL+F9. Toggle the field code to display the result with ALT+F9. When a change is made, you can update the field by selecting the field and pressing F9, or update all fields by pressing CTRL+a (selects all) and pressing F9, toggling to and from print preview (if "Update Fields" is checked in the FilePrintOptions dialog box), or running a macro something like: Sub UpdateFields() Dim oStory As Range For Each oStory In ActiveDocument.StoryRanges oStory.Fields.Update If oStory.StoryType wdMainTextStory Then While Not (oStory.NextStoryRange Is Nothing) Set oStory = oStory.NextStoryRange oStory.Fields.Update Wend End If Next oStory Set oStory = Nothing End Sub -- Greg Maxey/Word MVP A Peer in Peer to Peer Support ChiefNewB wrote: Would like to know if it is possible and if so how to automatically calculate the totals for a time card template. |
#3
|
|||
|
|||
But note that if you're trying to add times, you may need to embed an Excel
sheet instead of using Word's fields. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Greg Maxey" wrote in message ... CheifNewB, To automate the calculation you will need to set up your template as a protected form. You should get a good start here and the linked articles by Dian Chapman: http://word.mvps.org/faqs/customizat...nTheBlanks.htm You can semi-automate calculations using formula fields and then updating the fields. Let's say the hours worked are in a column. At the bottom put the field {=sum(above)}. The field code braces { } are entered with CTRL+F9. Toggle the field code to display the result with ALT+F9. When a change is made, you can update the field by selecting the field and pressing F9, or update all fields by pressing CTRL+a (selects all) and pressing F9, toggling to and from print preview (if "Update Fields" is checked in the FilePrintOptions dialog box), or running a macro something like: Sub UpdateFields() Dim oStory As Range For Each oStory In ActiveDocument.StoryRanges oStory.Fields.Update If oStory.StoryType wdMainTextStory Then While Not (oStory.NextStoryRange Is Nothing) Set oStory = oStory.NextStoryRange oStory.Fields.Update Wend End If Next oStory Set oStory = Nothing End Sub -- Greg Maxey/Word MVP A Peer in Peer to Peer Support ChiefNewB wrote: Would like to know if it is possible and if so how to automatically calculate the totals for a time card template. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Continuous breaks convert to next page breaks | Jennifer Hunt | General Discussion | 2 | December 30th, 2004 05:45 PM |
How to change merge forms from Word Perfect to Microsoft Word | Charles Kenyon | General Discussion | 1 | December 30th, 2004 03:35 PM |
Running Word 2000 Templates in Word 2003 | Kathy | General Discussion | 1 | November 4th, 2004 11:37 PM |
Writing a book in microsoft word, instructions how, | newtknight | Formatting Long Documents | 10 | June 22nd, 2004 09:35 PM |
adding mailmerge field in word 2000 document | Karel | Mailmerge | 1 | May 19th, 2004 10:05 AM |