Calculate Time in Word Tables

K

kaykayIT

I have a simple table with time in (B1) and time out (B2). All I want is in
B4 the difference between b1 and b2 to show the total time worked. Is there
any way to calculate time in a Word table? I have tried embedding an Excel
spreadsheet but it does not give me the create date as the time in. I have
created a button for that but keep getting the 'Method "Range" of object
"_Global" failed' message. I'm at my wits end.
 
M

macropod

Hi kaykayIT,

You could use a macro with the DateDiff function, or field coding. The macro
approach is fairly straightforward and is well-enough documented in Word's
vba help file.

Apart from the complexity of coding a field, the main issue you'd have is
that you'd have to use bookmarks to hold the times (though you could use
CREATEDATE explicitly) because Word's table cell referencing doesn't work
with date or time values. For a 'tutorial' with examples of how you can do
this using Word fields, download the Word document at:
www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
(url all one line)

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top