Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Excerpt

This class is used to get and set document protection settings for a document.

Signature
C#
C#
<p> public sealed class DocumentProtection
DocumentProtection</p>
Signature
vb.net
vb.net
Public<p>Public NotInheritable Class DocumentProtection
DocumentProtection</p>
Remarks

You cannot create a DocumentProtection object using the new keyword. You must get an existing DocumentProtection object from a Document.

MS Word equivalent: Tools menu > Protect Document...

The following sample gets the DocumentProtection object of a document so you can start working with these properties.

...

Name

Description

AnnotationsLocked

Excerpt Include
WW8:DocumentProtection.AnnotationsLockedWW8:
DocumentProtection.AnnotationsLocked
nopaneltrue

AutoFormatOverride

Excerpt Include
WW8:DocumentProtection.AutoFormatOverrideWW8:
DocumentProtection.AutoFormatOverride
nopaneltrue

DocumentProtected

Excerpt Include
WW8:DocumentProtection.DocumentProtectedWW8:
DocumentProtection.DocumentProtected
nopaneltrue

EnforceDocumentProtection

Excerpt Include
WW8:DocumentProtection.EnforceDocumentProtectionWW8:
DocumentProtection.EnforceDocumentProtection
nopaneltrue

SelectOnlyFormFields

Excerpt Include
WW8:DocumentProtection.SelectOnlyFormFieldsWW8:
DocumentProtection.SelectOnlyFormFields
nopaneltrue

StylesLocked

Excerpt Include
WW8:DocumentProtection.StylesLockedWW8:
DocumentProtection.StylesLocked
nopaneltrue

...

Name

Description

ProtectionLevel

Excerpt Include
WW8:DocumentProtection.ProtectionLevelWW8:
DocumentProtection.ProtectionLevel
nopaneltrue