MailItem.ExpiryTime property (Outlook)
Returns or sets a Date indicating the date and time at which the item becomes invalid and can be deleted. Read/write.
Syntax
expression. ExpiryTime
expression A variable that represents a MailItem object.
Example
This Visual Basic for Applications (VBA) example uses the MailItem.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"
myItem.Send
End Sub
Private Sub myItem_Send(Cancel As Boolean)
myItem.ExpiryTime = #2/2/2003 4:00:00 PM#
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla