Reset permissions on outlook folders using VBA
On May 27, 2009,
in Programming,
by Mike Hudson
Using the Redemption object you can use the following code to reset the permissions on a folders sub folders in outlook to leave the Default permissions.
Handy if you need to reset permissions on large numbers of folders.
Sub scall()
Dim TopFolder
Set mySession = CreateObject("Redemption.RDOSession")
mySession.Logon
Set TopFolder = mySession.PickFolder
For i = 1 To TopFolder.Folders.Count
Debug.Print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>> " & TopFolder.Folders(i).Name
For Each ace In TopFolder.Folders (i).ACL
Debug.Print ace.Name & " - " & ace.rights
If ace.Name "Default" Then
ace.Delete
Debug.Print ">>>>>>>>>>>>>>>
Deleted " & ace.Name
Else
If ace.rights > 0 Then
ace.rights = 0
Debug.Print "<<<<<<<<<<<<<<< Rights Reset"
Else
Debug.Print "< Rights default"
End If
End If
Next
Next
End Sub
Breadcrumbs: Home > Redemption







