Show User Permissions : Office Permmison « Application « VBA / Excel / Access / Word






Show User Permissions

 
Sub ShowUserPermissions()
    Dim myPermission As Office.Permission, usr As Office.UserPermission
    Set myPermission = ThisWorkbook.Permission
    Debug.Print "User", , "Permission", "Permission Expires"
    Set usr = myPermission("ExcelDemo@Hotmail.com")
    usr.Permission = MsoPermission.msoPermissionChange Or MsoPermission.msoPermissionPrint
    For Each usr In myPermission
        Debug.Print usr.UserId, usr.Permission, usr.ExpirationDate
    Next
    Debug.Print myPermission.DocumentAuthor, myPermission.RequestPermissionURL
End Sub

 








Related examples in the same category

1.Enable permission
2.Add users
3.The Permission of current workbook
4.Remove Permissions
5.Show Permissions
6.Set office Permission