本示例保护活动文档的窗体,不重新设置窗体域中的内容。

If ActiveDocument.ProtectionType = wpsNoProtection Then
    ActiveDocument.Protect _
    Type:=wpsAllowOnlyFormFields, NoReset:=True
End If