Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word Tables

LinkBack Thread Tools Display Modes
Old 09-18-2017, 12:56 PM
alexnooten alexnooten is offline Windows 7 64bit Office 2016
Join Date: Sep 2017
Posts: 1
alexnooten is on a distinguished road
Exclamation Automatic Timestamp Table Column

I have to scribe an audit for a medical device company in two days and am trying to format a table with three columns and multiple rows to catalog when each member is speaking. The first column is Time, second column the initials of the individual making the comments, and third the comments themselves. I know that I can manually time stamp each comment using the Shift+Alt+T command however this gets extremely cumbersome especially when multiple people are speaking quickly. I'd rather be more focused on typing the content of their speech rather than when it is said. Is there anyway to automatically time stamp each row when I begin entering information in the column(s) adjacent to them? I would know how to do this in excel, but in word I feel like I am restricted. I appreciate any help I can get.

Alexander M. Nootens
Reply With Quote
Old 09-18-2017, 02:44 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,110
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold

Doing this would entail writing an application event procedure, for which see:
and adding that to your document's template.

Once you've done the basic setup, you'd insert the following code into the class module:
Private Sub oApp_WindowSelectionChange(ByVal Sel As Selection)
If Sel.Information(wdWithInTable) <> True Then Exit Sub
If Sel.Tables(1).Range <> ActiveDocument.Tables(1).Range Then Exit Sub
Dim r As Long, c As Long
Application.ScreenUpdating = False
With Sel
  r = .Cells(1).RowIndex
  With .Tables(1)
    If Len(.Cell(r, 1).Range.Text) > 2 Then Exit Sub
    If r > 1 Then
      If Len(.Cell(r - 1, 1).Range.Text) = 2 Then Exit Sub
      If Len(.Cell(r - 1, 2).Range.Text) = 2 Then Exit Sub
    End If
    .Cell(r, 1).Range.Text = Format(Now(), "hh:mm:ss")
  End With
End With
Application.ScreenUpdating = True
End Sub
As coded, the macro will only insert the timestamp into the first column of the first table in the document. After the first row, it triggers only if the first two cells of the preceding row have content.
Paul Edstein
[MS MVP - Word]
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to put a formula in a table column header to define the name of the column? JacquesW Excel 3 05-08-2017 08:00 AM
Automatic, updated summary table in the end of document tilde85 Word 4 02-14-2017 06:37 AM
Automatic word updating in table barnel Word Tables 2 06-07-2015 04:04 AM
Problem with automatic table of contents pogonoforysci1 Word 14 04-14-2013 10:39 PM
Formatting automatic table of contents 1234msaps Word 3 10-31-2012 02:26 PM

All times are GMT -7. The time now is 01:56 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc. is not affiliated with Microsoft