If you build your table with a SEQ field in column 1 row 2 using
something like { SEQ myCol} then a macro like this may do:
Sub ScratchMacro()
Dim oTbl As Word.Table
Dim myRng As Range
Dim i As Long
If Selection.Information(wdWithInTable) Then
Set oTbl = Selection.Tables(1)
oTbl.Rows.Add
i = oTbl.Rows.Count
Set myRng = oTbl.Cell(i, 1).Range
myRng.Collapse
oTbl.Range.Fields.Add myRng, wdFieldEmpty, Text:="SEQ myCol"
Else
MsgBox "The cursor is not in a table"
End If
End Sub
> Is there a way I could Autonumber a column? I have an insert row button
> for a table and I was wondering if I could make the first column
[quoted text clipped - 6 lines]
>
> ......and so on.....
rachitm@gmail.com - 27 Nov 2006 18:22 GMT
Thanks Greg for your help! This works :)
> If you build your table with a SEQ field in column 1 row 2 using
> something like { SEQ myCol} then a macro like this may do:
[quoted text clipped - 25 lines]
> >
> > ......and so on.....