Reply
 
Thread Tools Display Modes
  #1   Report Post  
kaykayIT
 
Posts: n/a
Default Calculate Time in Word Tables

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.
  #2   Report Post  
macropod
 
Posts: n/a
Default

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:
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902
(url all one line)

Cheers

"kaykayIT" wrote in message
...
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.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 19/11/2004


  #3   Report Post  
antglykas antglykas is offline
Junior Member
 
Posts: 2
Default

This link doesn't seem to work

Quote:
Originally Posted by macropod View Post
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:
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902
(url all one line)

Cheers

"kaykayIT" wrote in message
...
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.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 19/11/2004
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
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
Is there a way to "join" tables in Word 2003? Julian Turner Tables 3 October 28th 04 06:51 PM


All times are GMT +1. The time now is 11:37 PM.

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

About Us

"It's about Microsoft Word"