Class ProtectionType
Enumerates the types of protection that can be applied to a document.
Inheritance
Namespace: IronWord.Models.Enums
Assembly: IronWord.dll
Syntax
public sealed class ProtectionType : Enum
Decide how much editing a protected document permits by setting ProtectionType on WordDocumentProtectionSettings.Type. None leaves the document fully editable, ReadOnly blocks all changes, FormFilling allows entries in form fields while locking the rest of the content, CommentsOnly permits comments but no edits, and TrackChanges forces every edit to be recorded as a tracked revision.
var settings = new WordDocumentProtectionSettings { Type = ProtectionType.ReadOnly };Fields
CommentsOnly
Only comments can be inserted into the document.
Declaration
public const ProtectionType CommentsOnly
Field Value
| Type | Description |
|---|---|
| ProtectionType |
FormFilling
Only form fields can be filled out.
Declaration
public const ProtectionType FormFilling
Field Value
| Type | Description |
|---|---|
| ProtectionType |
None
No protection applied.
Declaration
public const ProtectionType None
Field Value
| Type | Description |
|---|---|
| ProtectionType |
ReadOnly
Document is protected from edits, but specific sections or content regions can be exempt.
Declaration
public const ProtectionType ReadOnly
Field Value
| Type | Description |
|---|---|
| ProtectionType |
TrackChanges
Only track changes is enabled.
Declaration
public const ProtectionType TrackChanges
Field Value
| Type | Description |
|---|---|
| ProtectionType |
value__
Declaration
public int value__
Field Value
| Type | Description |
|---|---|
| System.Int32 |