Document.Protect (Word)

Protects the specified document from unauthorized changes.

Protect (Type, NoReset, Password, UseIRM, EnforceStyleLock)


ActiveDocument.Protect Type:=wdAllowOnlyComments

Arguments

The following argument is required

Type - WdProtectionType


Possible values are

wdAllowOnlyComments Allow only comments to be added to the document.
wdAllowOnlyFormFields Allow content to be added to the document only through form fields.
wdAllowOnlyReading Allow read-only access to the document.
wdAllowOnlyRevisions Allow only revisions to be made to existing content.
wdNoProtection Do not apply protection to the document.

Optional arguments

The following arguments are optional

NoReset - WdProtectionType


Possible values are

wdAllowOnlyComments Allow only comments to be added to the document.
wdAllowOnlyFormFields Allow content to be added to the document only through form fields.
wdAllowOnlyReading Allow read-only access to the document.
wdAllowOnlyRevisions Allow only revisions to be made to existing content.
wdNoProtection Do not apply protection to the document.

Password - String

UseIRM - Boolean

EnforceStyleLock - Boolean