Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

PermissionObject Interface (Microsoft.Office.Interop.InfoPath)

Provides access to UserPermissionObject objects and permission settings that can be applied to a form.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)

public interface PermissionObject : Permission

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, see Permission.

Use the PermissionObject class and its members to restrict permissions to the active form and to get or set specific permissions settings.

An instance of the Permission class associated with a form template is returned by the Permission property of the _XDocument3 class.

The returned PermissionObject object provides access to the UserPermissionObject objects associated with the form template and each form instance created with that template. Each UserPermissionObject object is used to define a specific set of rights for an individual user. While some permissions granted through the user interface apply to all users, you can use the UserPermissionObject object to assign permission on a per-user basis with per-user expiration dates.

The PermissionObject object and its properties and methods are available whether permissions are restricted on the active form template or not. Use the Enabled property to determine whether a form has restricted permissions.

If the Windows Rights Management client is not installed on a user's computer, using the PermissionObject object raises an exception.

Permissions on a form are enabled in one of the following ways by using properties and methods of the PermissionObject object:

The Enabled property is set to true.

The DocumentAuthor property is set.

The RequestPermissionURL property is set.

The StoreLicenses property is set to true or false.

The ApplyPolicy method is called.

Permissions on a form can also be enabled by using the Add method of the Permission object to add a user to the form.


Permissions cannot be applied when a form is in preview mode. For this reason, all of the properties of the PermissionObject object are read-only when a form is being previewed. In preview mode, the Enabled property will always return false, and if code attempts to change this setting, a System.Runtime.InteropServices.COMException is raised and the error "The property/method is not available in preview mode" is returned. Similarly, the methods associated with the PermissionObject and UserPermissionObject objects will also return this error message when used in preview mode.

Community Additions

© 2015 Microsoft