Try the following version of the macro. With this one, if any formfield on a given row
between the 4th & last rows is not empty, that row will not be deleted.
Code:
Sub DeleteEmptyRows()
'Delete empty rows in the table
Application.ScreenUpdating = False
Dim StrPwd As String, i As Long, j As Long, bDel As Boolean
StrPwd = ""
With ActiveDocument
If .ProtectionType = wdAllowOnlyFormFields Then .Unprotect Password:=StrPwd
With .Tables(2)
For i = .Rows.Count - 1 To 4 Step -1
bDel = False
With .Rows(i)
If .Range.FormFields.Count > 0 Then bDel = True
For j = 1 To .Range.FormFields.Count
If Trim(.Range.FormFields(j).Result) <> "" Then
bDel = False
Exit For
End If
Next
If bDel = True Then .Delete
End With
Next
End With
.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=StrPwd
End With
Application.ScreenUpdating = True
End Sub