Edytuj

Udostępnij za pośrednictwem


Permission Interface

Definition

Use the Permission object to restrict permissions to the active document and to return or set specific permissions settings.

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

Remarks

The Permission property of the Microsoft Office Word 2003 Document object, the Microsoft Office Excel 2003 Workbook object, and the Microsoft Office PowerPoint 2003 Presentation object returns a Permission object.

Use the Enabled property to determine whether permissions are restricted on the active document. Use the Count property to return the number of users with permissions and the RemoveAll() method to reset all existing permissions.

The DocumentAuthor, EnableTrustedBrowser, RequestPermissionURL, and StoreLicenses properties provide additional information about permissions settings.

The Permission object gives access to a collection of UserPermission objects. Use the UserPermission object to associate specific sets of rights with individual users. 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.

Microsoft Office Information Rights Management supports the use of administrative permission policies which list users and groups and their document permissions. Use the ApplyPolicy(String) method to apply a permission policy and the PermissionFromPolicy, PolicyName, and PolicyDescription properties to return policy information.

The Permission object model is available regardless of whether permissions are restricted on the active document. The Permission property of the Document, Workbook, and Presentation objects does not return Nothing when the active document does not have restricted permissions. Use the Enabled property to determine whether a document has restricted permissions.

Use of the Permission object raises an error when the Windows Rights Management client is not installed.

Properties

Application

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

Count

Returns an Integer indicating the number of items in the specified collection.

Creator

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

DocumentAuthor

Returns or sets the name in email form of the author of the active document.

Enabled

Returns or sets a Boolean value that indicates whether permissions are enabled on the active document.

EnableTrustedBrowser

Returns or sets the option that allows a user to view a document with restricted permissions in a web browser if the user does not have the appropriate client application installed.

Item[Object]

Returns a UserPermission object that is a member of the Permission collection.

Parent

Returns the Parent object for the specified object.

PermissionFromPolicy

Returns a Boolean value that indicates whether a permission policy has been applied to the active document.

PolicyDescription

Returns the description of the permissions policy applied to the active document.

PolicyName

Returns the name of the permissions policy applied to the active document.

RequestPermissionURL

Returns or sets the file or web site URL to visit or the email address to contact for users who need additional permissions on the active document.

StoreLicenses

Returns a Boolean value that indicates whether the user's license to view the active document should be cached to allow offline viewing when the user cannot connect to a rights management server.

Methods

Add(String, Object, Object)

Creates a new set of permissions on the active document for the specified user.

ApplyPolicy(String)

Applies the specified permission policy to the active document.

GetEnumerator()
RemoveAll()

Removes all UserPermission objects from the Permission collection of the active document and disables restrictions on the active document.

Applies to