StartDownloadsServiceSamplesWorkshopsContact DeutschEnglish
Awarded by
Microsoft since 2005:
mvp logo
VBOffice Info
Privacy Policy
E-Mail: Send and Delete
Author: Michael BauerHomepage
Date: 06.12.2006Accessed: 31912

Sometimes you send e-mails which don't need to be stored. Via the Options dialog you can determine with four mouse clicks not to store an email - 3 clicks too much.

From Outlook 2003 on this small VBA sample helps you to save time. Copy the code into 'ThisOutlookSession' and on the email's toolbar create a new button that calls the sample. If you want to send an email and store it then call the old 'Send' button - but if you don't need to store it then click the new button, maybe called 'Send And Delete'.

(In principle it works as well for Outlook prior to version 2003. You can avoid the then upcoming security prompt with the Redemption.)

Public Sub SendAndDelete()
  Dim obj As Object
  Dim Mail As Outlook.MailItem

  If MsgBox("Delete email?", vbYesNo Or vbQuestion) = vbNo Then
    Exit Sub
  End If

  Set obj = Application.ActiveInspector.CurrentItem
  If TypeOf obj Is Outlook.MailItem Then
    Set Mail = obj
    Mail.DeleteAfterSubmit = True
  End If
End Sub

ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more]


Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more]


SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more]


OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more]