Apart from the >> which should not be present, it works fine
Code:
Sub AddRow()
Const strPassWord As String = "password1"
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:=strPassWord
End If
ActiveDocument.Tables(1).Rows.Add
'If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=strPassWord
'End If
End Sub