Partager via


UserPermission.Permission Property

Returns or sets an Integer value representing the permissions on the active document assigned to the user associated with the specified UserPermission object.

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

Syntax

'Declaration
Property Permission As Integer
    Get
    Set
'Usage
Dim instance As UserPermission
Dim value As Integer

value = instance.Permission

instance.Permission = value
int Permission { get; set; }

Property Value

Type: System.Int32

Remarks

The Permission property can be one or a combination of MsoPermission constants.

The UserPermission object associates a set of permissions on the active document with a single user and an optional expiration date. The Permission property returns the set of user permissions determined by the specified UserPermission object. While some permissions granted through the user interface (such as msoPermissionPrint) apply to all users, you can use the UserPermission object to assign them on a per-user basis with per-user expiration dates.

  • The msoPermissionView or msoPermissionRead option corresponds to the Read option in the user interface.

  • The msoPermissionExtract option corresponds to the Allow users with read access to copy content option in the user interface.

  • The msoPermissionChange option corresponds to the Change option in the user interface. The msoPermissionChange option represents the sum of msoPermissionView + msoPermissionEdit + msoPermissionSave + msoPermissionExtract and allows users to view, edit, copy, and save, but not print, the document.

  • The msoPermissionPrint option corresponds to thePrint content option in the user interface.

  • The msoPermissionObjectModel option corresponds to the Access content programmatically option in the user interface and allows users to access the document programmatically through its object model. Users without msoPermissionObjectModel cannot use the object model to determine their own rights, because programmatic access is disabled.

See Also

Reference

UserPermission Interface

UserPermission Members

Microsoft.Office.Core Namespace