View Single Post
  #4  
Old April 13th, 2010, 05:44 AM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Calculate elapsed time in Word table?

Or using text formfields, with the document protected for forms, and an 'on exit' macro to do the calculation and insert the result
into the required cell (eg via another formfield). A suitable 'on exit' macro might look like:
Sub TimeDiff()
With ActiveDocument
.FormFields("Text3").Result = _
Format(CDate(.FormFields("Text1").Result) - CDate(.FormFields("Text2").Result), "HH:mm")
End With
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Doug Robbins - Word MVP" wrote in message ...
The easiest thing would be to insert an Excel spreadsheet into the Word document.

--
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, originally posted via msnews.microsoft.com

"jeff m" wrote in message ...
Hello. Is there a relatively easy way to have a formula in one cell show the
product of subracting the time in cell B minus cell A? I know how to do this
in Excel but would appreciate guidance about doing this in Word 2007.
Thanks!
--
Jeff Matranga