Provided that the selection is in that added row following the
insertion, you may be able to adapt something like this:
Sub ScratchMacro()
Dim oRng As Word.Range
Dim oFrmFlds As FormFields
Dim pRowNum As Long
Dim pIndex As Long
Set oRng = Selection.Rows(1).Range
Set oFrmFlds = oRng.FormFields
pRowNum = oRng.Information(wdEndOfRangeRowNumber)
pIndex = 0
On Error Resume Next
ActiveDocument.Unprotect
On Error GoTo 0
For pIndex = 1 To oFrmFlds.Count 'Should be 6 in your case
oFrmFlds(pIndex).Select
Select Case oFrmFlds(pIndex).Type
Case wdFieldFormTextInput
With Dialogs(wdDialogFormFieldOptions)
.Name = "TextRow" & pRowNum & "_" & pIndex
.Execute
End With
If pIndex = 6 Then
oFrmFlds(pIndex).TextInput.EditType wdCalculationText,
"=TextRow" & pRowNum & "_4 + 10" 'value of the newly bookmarked current
row cell 4 + 10
End If
Case wdFieldFormCheckBox
'Do Nothing
Case wdFieldFormDropDown
'Do Nothing
Case Else
'Do Nothing
End Select
Next pIndex
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub
> I have an insert button on my page, which inserts a row in a table with
>
[quoted text clipped - 9 lines]
>
> Thanks
rachitm@gmail.com - 21 Nov 2006 17:03 GMT
Thank you for your help!!
> Provided that the selection is in that added row following the
> insertion, you may be able to adapt something like this:
[quoted text clipped - 48 lines]
> >
> > Thanks