'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