Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Is it possible to add a row to a table on a protected form in Word? If so,
how do I set up the form to allow this. |
#2
![]() |
|||
|
|||
![]()
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 ActiveDocument.Unprotect ActiveDocument.Tables(1).Rows.Add rownum = ActiveDocument.Tables(1).Rows.Count For i = 1 To ActiveDocument.Tables(1).Columns.Count ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range, Type:=wdFieldFormTextInput Next i ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro = "addrow" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, 1).Range.FormFields(1).Select ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True 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 "mk1871" wrote in message ... Is it possible to add a row to a table on a protected form in Word? If so, how do I set up the form to allow this. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protected Form - allow users to access hyperlink in the form | Microsoft Word Help | |||
Table AutoFormats vs. Table Styles confusion | Tables | |||
Allowing calculations in a table in a protected form? | Tables | |||
Table Gridlines in Word 2003 Form | Tables | |||
Using VBA to Add Table Row to Form Table | Tables |