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






Show Permissions

 
Sub ShowPermissions() ' From Help
    Dim myPermission As Office.Permission
    Set myPermission = ActiveWorkbook.Permission

    If myPermission.Enabled Then
        If myPermission.PermissionFromPolicy Then
            Debug.Print "Policy name: " & myPermission.PolicyName 
            Debug.Print "Policy description: " & myPermission.PolicyDescription
        Else
            Debug.Print "Default policy name: " & myPermission.PolicyName 
            Debug.Print "Default policy description: " & myPermission.PolicyDescription
        End If
    Else
        Debug.Print "Permission are NOT restricted on this document."
    End If
    Set myPermission = Nothing
End Sub

 








Related examples in the same category

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