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
|