共用方式為


_XDocument3.Permission 屬性

取得與表單關聯之 PermissionObject 物件的參照。

**命名空間:**Microsoft.Office.Interop.InfoPath
**組件:**Microsoft.Office.Interop.InfoPath (於 microsoft.office.interop.infopath.dll 中)

語法

'宣告
<DispIdAttribute(50)> _
ReadOnly Property Permission As PermissionObject
'用途
Dim instance As _XDocument3
Dim value As PermissionObject

value = instance.Permission
[DispIdAttribute(50)] 
PermissionObject Permission { get; }

屬性值

表示表單之「資訊版權管理」(IRM) 權限設定的 PermissionObject 物件。

備註

在傳回 PermissionObject 物件的參照之後,就可以用它來限制對使用中表單的權限,以及傳回或設定特定權限設定,例如,是否可以編輯、複製或列印該表單中的資料。

範例

在下列範例中,Permission 屬性是用於傳回目前表單的 PermissionObject 物件,然後此物件會使用 Enabled 屬性來顯示是否已啟用目前表單的權限設定。

_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())

請參閱

參考

_XDocument3 介面
_XDocument3 成員
Microsoft.Office.Interop.InfoPath 命名空間