Class WordDocumentProtectionSettings
Represents settings for protecting a Word document.
Inheritance
System.Object
WordDocumentProtectionSettings
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class WordDocumentProtectionSettings : Object
Constructors
WordDocumentProtectionSettings()
Initializes a new instance of the
Declaration
public WordDocumentProtectionSettings()
WordDocumentProtectionSettings(ProtectionType, String)
Initializes a new instance of the
Declaration
public WordDocumentProtectionSettings(ProtectionType type, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| ProtectionType | type | The type of protection. |
| System.String | password | The protection password. |
Properties
AllowedStyles
If formatting restrictions are applied, this collection determines which styles are allowed.
Declaration
public List<string> AllowedStyles { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
Password
Gets or sets the password used for protection. If null, no password is required to unprotect the document.
Declaration
public string Password { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
RestrictFormatting
Gets or sets a value indicating whether formatting restrictions are applied.
Declaration
public bool RestrictFormatting { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Type
Gets or sets the type of protection applied to the document.
Declaration
public ProtectionType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| ProtectionType |
UnprotectedRegions
Gets or sets a list of sections or content regions that are exempt from protection.
Declaration
public List<UnprotectedRegion> UnprotectedRegions { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<UnprotectedRegion> |