Vestige
03-11-2014, 09:56 PM
I have a simple Word timesheet (I tried to get them to do it in Excel). I'd like to be able to update the time summary fields without updating the date fields. All my other subs work except the range-based field update.
I have pieced together the following subroutine after a few hours of research. I keep getting the "Invalid or unqualified reference" compile error highlighting the first .Tables(2) reference in the range definition.
Sub UpdateTimeFields()
'
' UpdateTimeFields Macro
'
'
Dim TimeCells As Range
Set TimeCells = ActiveDocument.Range(Start:=Tables(2).Cell(3, 3).Range.Start, End:=.Tables(2).Cell(37, 4).Range.End)
Selection.Fields.Update
TimeCells.Select
End Sub
Any help would be appreciated...
Gary
I have pieced together the following subroutine after a few hours of research. I keep getting the "Invalid or unqualified reference" compile error highlighting the first .Tables(2) reference in the range definition.
Sub UpdateTimeFields()
'
' UpdateTimeFields Macro
'
'
Dim TimeCells As Range
Set TimeCells = ActiveDocument.Range(Start:=Tables(2).Cell(3, 3).Range.Start, End:=.Tables(2).Cell(37, 4).Range.End)
Selection.Fields.Update
TimeCells.Select
End Sub
Any help would be appreciated...
Gary