Have the following macro run on exit from the last formfield in the last row
of the table. It will ask the user if they want to add another row.
Sub addrow()
' Macro created 02/02/03 by Doug Robbins
' To add a new row to a table containing formfields in every column
' automatically on exit from the last cell in the present last row of the
table
Dim rownum As Integer, i As Integer
Response = MsgBox("Do you need another row?", 36, "Add Row")
If Response = vbYes Then
ActiveDocument.Unprotect
With Selection.Tables(1)
.Rows.Add
rownum = .Rows.Count
For i = 1 To .Columns.Count
ActiveDocument.FormFields.Add Range:=.Cell(rownum, i).Range,
Type:=wdFieldFormTextInput
Next i
.Cell(.Rows.Count, .Columns.Count).Range.FormFields(1).ExitMacro =
"addrow"
.Cell(.Rows.Count, 1).Range.FormFields(1).Select
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
End Sub
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP