Reply
 
Thread Tools Display Modes
  #1   Report Post  
ChiefNewB
 
Posts: n/a
Default 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   Report Post  
Greg Maxey
 
Posts: n/a
Default

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   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

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.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I divide a page into three sections? Bonnie Microsoft Word Help 3 May 8th 23 02:47 AM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM
WordPerfect - copying formatting Morgan Page Layout 1 January 10th 05 05:00 PM
Continuous breaks convert to next page breaks Jennifer Hunt Microsoft Word Help 2 December 30th 04 05:45 PM
macro in word js Microsoft Word Help 1 December 28th 04 03:01 AM


All times are GMT +1. The time now is 09:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"