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
Wiki Markup
{description}
{excerpt}Sets or returns a {{boolean}} representing whether or not Word will enforce document protection in this document.{excerpt}
{signature:C#}
 public boolean EnforceDocumentProtection{ get; set; }
{signature}{signature:vb.net}
Public Property EnforceDocumentProtection() As Boolean
{signature}
{remarks}MS Word equivalent: Protect = Tools menu > Protect Document... > 3. Start enforcement section > Yes, Start Enforcing Protection button & Unprotect = Tools menu > Unprotect Document

{remarks}
{example}{code:csharp|title=C#}

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

          //--- Set EnforceDocumentProtection
          docProtect.EnforceDocumentProtection = true;
        {code}
{code:vb.net|title=vb.net}

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

          '--- Set EnforceDocumentProtection
          docProtect.EnforceDocumentProtection = True
        {code}

{example}