UserPermission.ExpirationDate Property

Gets or sets the optional expiration date for the permissions on the current form assigned to the user associated with a UserPermission object.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Property ExpirationDate As Object
    Get
    Set
'Usage
Dim instance As UserPermission
Dim value As Object

value = instance.ExpirationDate

instance.ExpirationDate = value
Object ExpirationDate { get; set; }

Property Value

Type: System.Object
A System.DateTime that represents the expiration date for the user associated with the UserPermission object.

Remarks

A UserPermission object associates a set of permissions on the current form with a single user and an optional expiration date. The ExpirationDate property gets or sets the optional expiration date of this UserPermission object using the local time zone.

Examples

In the following example, a UserPermission object retrieved from the Permission collection for the current form, and then the ExpirationDate property is used to display that user's expiration date.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
UserPermission thisUser = 
   thisDoc.Permission["someone@example.com"];
thisXDocument.UI.Alert(thisUser.ExpirationDate.ToString());
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
UserPermission thisUser = 
   Permission.UserPermissions("someone@example.com")
thisXDocument.UI.Alert(thisUser.ExpirationDate.ToString())

See Also

Reference

UserPermission Interface

UserPermission Members

Microsoft.Office.Interop.InfoPath Namespace