Permission.Item[Object] プロパティ

定義

指定した UserPermission インデックス位置にある オブジェクトを取得します。

public:
 property Microsoft::Office::Interop::InfoPath::UserPermissionObject ^ default[System::Object ^] { Microsoft::Office::Interop::InfoPath::UserPermissionObject ^ get(System::Object ^ varIndex); };
public Microsoft.Office.Interop.InfoPath.UserPermissionObject this[object varIndex] { get; }
member this.Item(obj) : Microsoft.Office.Interop.InfoPath.UserPermissionObject
Default Public ReadOnly Property Item(varIndex As Object) As UserPermissionObject

パラメーター

varIndex
Object

Permission コレクション内の UserPermission オブジェクトの数値インデックス、または現在のフォームに対するアクセス許可のセットを取得するユーザーの電子メール アドレス。

プロパティ値

UserPermission指定したユーザーを表す オブジェクト。 指定したが存在しない場合は、null 参照 (Visual Basic では Nothing) を返します varIndex

次の例では、Item プロパティを使用して、電子メール アドレス "someone@example.com" に関連付けられているユーザーの UserPermission オブジェクトを取得し、UserPermission オブジェクトのプロパティを使用Permissionしてそのユーザーのアクセス許可を Change アクセス レベルに設定します。

アクセス許可を MsoPermission 設定するための列挙値にアクセスするには、Visual Studio 2012 または Visual Studio の [参照の追加] ダイアログ ボックスの [ COM ] タブを使用して、Microsoft Office 14.0 オブジェクト ライブラリへの参照を設定する必要があります。 これにより、Microsoft.Office.Core 名前空間のメンバーへの参照が確立されます。

この例では、フォーム モジュールの宣言セクションの Microsoft.Office.Core 名前空間に対して、using ディレクティブまたは Imports ディレクティブが必要です。

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisDoc.Permission["someone@example.com"].Permission = 
   (int)MsoPermission.msoPermissionChange;
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
thisDoc.Permission["someone@example.com"].Permission = _
   DirectCast(MsoPermission.msoPermissionChange, Integer)

適用対象