Sub ShowNoDelPerms()
Dim objContainer As Container
Dim objDoc As Document
For Each objContainer In CurrentDb.Containers
Debug.Print objContainer.Name
For Each objDoc In objContainer.Documents
If (objDoc.AllPermissions And dbSecDelete) = dbSecDelete Then
Debug.Print "Can Delete Document: " & objDoc.Name;
objDoc.UserName = "Admin"
Debug.Print "Perms: " & objDoc.AllPermissions
Else
Debug.Print "Cannot Delete Document: " & objDoc.Name;
objDoc.UserName = "Admin"
Debug.Print "Perms: " & objDoc.AllPermissions
End If
Next
Next
End Sub
|