Page tree
    Created with Raphaël 2.1.0
    Loading...
Skip to end of metadata
Go to start of metadata

Description

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

C#
public boolean EnforceDocumentProtection{ get; set; }
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

Examples

C#
//--- Get EnforceDocumentProtection
bool enforceDocumentProtection = docProtect.EnforceDocumentProtection;
 
//--- Set EnforceDocumentProtection
docProtect.EnforceDocumentProtection = true;
vb.net
'--- Get EnforceDocumentProtection
Dim enforceDocumentProtection As Boolean = docProtect.EnforceDocumentProtection
 
'--- Set EnforceDocumentProtection
docProtect.EnforceDocumentProtection = True
  • No labels