Thread: [Solved] Timestamp Button Word
View Single Post
 
Old 12-29-2012, 08:47 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Basically something like this:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRow As Word.Row
If Selection.Information(wdWithInTable) Then
  Selection.Collapse wdCollapseStart
  Set oRow = Selection.Rows(1)
  oRow.Cells(1).Range.Text = Format(Now, "hh:mm:ss")
  oRow.Cells(2).Range.Text = Format(Now, "dd-MMM-yy")
End If
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote