ExpiryTime Property

Returns or sets a Date indicating the date and time at which the item becomes invalid and can be deleted. Read/write.


*expression   * Required. An expression that returns a MailItem , MeetingItem , or PostItem object.


This Visual Basic for Applications (VBA) example uses the Send event and sends an item with an automatic expiration date.

Public WithEvents myItem As MailItem
Sub SendMyMail()
    Set myItem = Outlook.CreateItem(olMailItem)
    myItem.To = "Laura Jennings"
    myItem.Subject = "Data files information"
End Sub

Private Sub myItem_Send(Cancel As Boolean)
    myItem.ExpiryTime = #2/2/2003 4:00:00 PM#
End Sub

Applies to | MailItem Object | MeetingItem Object | PostItem Object

See Also | ReceivedTime Property | SentOn Property