Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

Sets or returns a protection level for the document. Possible values are: None, TrackChanges, Comments, Forms, and ReadOnly.

Signature
C#
C#

 public ProtectionLevel DocumentProtected{ get; set; }
Signature
vb.net
vb.net

Public Property DocumentProtected() As ProtectionLevel
Example
 
Code Block
csharp
csharp
titleC#
          
//--- Get ProtectionLevel
          DocumentProtection.ProtectionLevel level = docProtect.DocumentProtected;

          //--- Set ProtectionLevel to allow editing of Forms only
          docProtect.DocumentProtected = DocumentProtection.ProtectionLevel.Comments;
        
Code Block
vb.net
vb.net
titlevb.net
          
'--- Get ProtectionLevel
          Dim level As DocumentProtection.ProtectionLevel = docProtect.DocumentProtected

          '--- Set ProtectionLevel to allow editing of Forms only
          docProtect.DocumentProtected = DocumentProtection.ProtectionLevel.Comments
        
Example