Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oTbl As Table
Dim oCell As Cell
Set oTbl = Selection.Tables(1)
For Each oCell In oTbl.Range.Cells
If oCell.ColumnIndex = 1 Then
If Len(oCell.Range.Text) > 2 Then
oCell.Range.InsertBefore "Gen "
End If
End If
Next
lbl_Exit:
Exit Sub
End Sub
Sub ScratchMacro2()
'A basic Word macro coded by Greg Maxey
Dim oTbl As Table
Dim oCol As Column
Dim oCell As Cell
Set oTbl = Selection.Tables(1)
If oTbl.Uniform Then
Set oCol = oTbl.Columns(1)
For Each oCell In oCol.Cells
If oCell.ColumnIndex = 1 Then
If Len(oCell.Range.Text) > 2 Then
oCell.Range.InsertBefore "Gen "
End If
End If
Next
End If
lbl_Exit:
Exit Sub
End Sub
If the table is uniform, the second macro will be faster.