편집

다음을 통해 공유


_XDocument3.Permission Property

Definition

Gets a reference to a PermissionObject object associated with the form.

public:
 property Microsoft::Office::Interop::InfoPath::PermissionObject ^ Permission { Microsoft::Office::Interop::InfoPath::PermissionObject ^ get(); };
public Microsoft.Office.Interop.InfoPath.PermissionObject Permission { get; }
member this.Permission : Microsoft.Office.Interop.InfoPath.PermissionObject
Public ReadOnly Property Permission As PermissionObject

Property Value

A PermissionObject object that represents the Information Rights Management (IRM) permission settings for the form.

Examples

In the following example, the Permission property to return a PermissionObject object for the current form, which then uses the Enabled property to display whether permission settings are enabled for the current form.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisXDocument.UI.Alert(
   thisDoc.Permission.Enabled.ToString());
Dim thisDoc As _XDocument3 = _
   DirectCast(thisXDocument, _XDocument3)
thisXDocument.UI.Alert(
   thisDoc.Permission.Enabled.ToString())

In the following example, the Permission property to return a PermissionObject object for the current form, which then uses the Enabled property to display whether permission settings are enabled for the current form.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisXDocument.UI.Alert(
   thisDoc.Permission.Enabled.ToString());
Dim thisDoc As _XDocument3 = _
   DirectCast(thisXDocument, _XDocument3)
thisXDocument.UI.Alert(
   thisDoc.Permission.Enabled.ToString())

Remarks

After a reference to the PermissionObject object is returned, it can be used to restrict permissions to the active form and to return or set specific permissions settings, such as whether data in the form can be edited, copied, or printed.

Applies to