The following will need a bit of a modification for hours entered in the way
you are doing it (It assumes that the hours are entered in 24hours clock
format and that we are not talking about someone working the graveyard
shift):
' a Macro to calculate the elapsed time for formfields with Date format of
HH:mm
' Macro created 16 May 1999 by Doug Robbins - Word MVP
'
Start = ActiveDocument.FormFields("Text1").Result
StartHour = Val(Left(Start, 2))
StartMinutes = Val(Right(Start, 2))
StartTimeMinutes = StartHour * 60 + StartMinutes
Finish = ActiveDocument.FormFields("Text2").Result
FinishHour = Val(Left(Finish, 2))
FinishMinutes = Val(Right(Finish, 2))
FinishTimeMinutes = FinishHour * 60 + FinishMinutes
ElapsedMinutes = FinishTimeMinutes - StartTimeMinutes
ElapsedHours = Int(ElapsedMinutes / 60)
ElapsedMinutes = ElapsedMinutes - ElapsedHours * 60
ActiveDocument.FormFields("Text3").Result = Str(ElapsedHours) & ":" &
Format(ElapsedMinutes, "00")
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP