Modifica

Condividi tramite


UserPermission Interface

Definition

The UserPermission object associates a set of permissions on the active document with a single user and an optional expiration date.

public interface class UserPermission : Microsoft::Office::Core::_IMsoDispObj
[System.Runtime.InteropServices.Guid("000C0375-0000-0000-C000-000000000046")]
public interface UserPermission : Microsoft.Office.Core._IMsoDispObj
[<System.Runtime.InteropServices.Guid("000C0375-0000-0000-C000-000000000046")>]
type UserPermission = interface
    interface _IMsoDispObj
Public Interface UserPermission
Implements _IMsoDispObj
Attributes
Implements

Remarks

Represents a member of the active document's Permission collection.

Use the Add(String, Object, Object) method of the Permission object to grant specific permissions on the active document to a new user, with an optional expiration date. Use the Remove() method of the UserPermission object to remove a user and the user's permissions.

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.

Properties

Application

Returns an Application object that represents the container application for the object.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

ExpirationDate

Returns or sets the optional expiration date of the permissions on the active document assigned to the user associated with the specified UserPermission object.

Parent

Returns the Parent object for the specified object.

Permission

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

UserId

Returns the email name of the user whose permissions on the active document are determined by the specified UserPermission object.

Methods

Remove()

Removes the specified UserPermission object from the Permission collection of the active document.

Applies to