Gets or sets a value representing the permissions on the current form assigned to the user associated with a UserPermission object.
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Because the UserPermission object and its members are new to Microsoft InfoPath, you must cast the object returned by the thisXDocument variable to the _XDocument3 type to access this object and its members. For more information, see How to: Use Microsoft.Office.Interop.InfoPath.SemiTrust Members That Are Not Compatible with InfoPath 2003.
This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
In the following example, the user associated with the e-mail address "firstname.lastname@example.org" is retrieved from the Permission collection of the form and assigned to a UserPermission object. Then, the property of the UserPermission object is used to set that user's permissions to the Change access level.
To access the MsoPermission enumeration values for setting permissions, you must set a reference to the Microsoft Office 14.0 Object Library using COM tab of the Add Reference dialog box in Visual Studio 2012. This will establish a reference to the members of the Microsoft.Office.Core namespace.
This example requires a using or Imports directive for the Microsoft.Office.Core namespace in the declarations section of the form module.