A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Calculate Time in Word Tables



 
 
Thread Tools Display Modes
  #1  
Old December 8th 04, 12:03 AM
kaykayIT
external usenet poster
 
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.
Ads
  #2  
Old December 8th 04, 04:05 AM
macropod
external usenet poster
 
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  
Old January 21st 13, 12:22 PM
antglykas antglykas is offline
Junior Member
 
First recorded activity by WordBanter: Jan 2013
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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
How can I divide a page into three sections? Bonnie Microsoft Word Help 2 November 30th 04 05:21 PM
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 07:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.