VBA - Document protection with exceptions RRS feed

  • Question

  • Hello,

    we are using the protection function in word with "exceptions", so that users can only edit defined ranges. Is it possible to disable, or if not, to delete the exceptions ranges, so that we can have an final document at the end?

    Usually we would use the protectiontype wdallowonlyreading, but this is the same as required for the exceptions.

    If ActiveDocument.ProtectionType = wdNoProtection Then
        ActiveDocument.Protect Password:="", noReset:=False, Type:= _
            wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False
    End If

    Thanks in advance!

    Tuesday, August 4, 2020 8:59 AM