Description
This class is used to get and set document protection settings for a document.
C#
vb.net
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.
Examples
C#
vb.net
Properties
Name |
Description |
---|---|
Sets or returns a boolean representing whether or not annotations are locked in this document. |
|
Sets or returns a boolean representing whether or not Word will autoformat to override a style lock down in this document. |
|
Sets or returns a protection level for the document. Possible values are: None, TrackChanges, Comments, Forms, and ReadOnly. | |
Sets or returns a boolean representing whether or not Word will enforce document protection in this document. |
|
Sets or returns a boolean representing whether or not Word will only allow selections in form fields for this document. |
|
Sets or returns a boolean representing whether or not Word will lock the Styles in this document. |
Nested Classes
Name |
Description |
---|---|
A DocumentProtection.ProtectionLevel value specifies what type of editing is allowed in the document. |