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
Description

Excerpt

Sets or returns a boolean representing whether or not Word will enforce document protection in this document.

Signature
C#
C#
 public boolean EnforceDocumentProtection{ get; set; }
Signature
vb.net
vb.net
Public Property EnforceDocumentProtection() As Boolean
Remarks

MS Word equivalent: Protect = Tools menu > Protect Document... > 3. Start enforcement section > Yes, Start Enforcing Protection button & Unprotect = Tools menu > Unprotect Document

Example
Code Block
csharp
csharp
titleC#

          //--- Get EnforceDocumentProtection
          bool enforceDocumentProtection = docProtect.EnforceDocumentProtection;

          //--- Set EnforceDocumentProtection
          docProtect.EnforceDocumentProtection = true;
        
Code Block
vb.net
vb.net
titlevb.net

          '--- Get EnforceDocumentProtection
          Dim enforceDocumentProtection As Boolean = docProtect.EnforceDocumentProtection

          '--- Set EnforceDocumentProtection
          docProtect.EnforceDocumentProtection = True