VBOffice

Display Options Dialog Before Sending

This sample opens the options dialog before sending an email so you can change some settings, for instance, delay the sending.

Last modified: 2006/01/19 | Accessed: 25.309  | #11
◀ Previous sample Next sample ▶
OLKeeper OLKeeper
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails.

By default, Outlook saves every sent email in the Sent Items folder, which is what you want in most cases. However, probably you'll send the one or other email that you don't need to keep, and for others you maybe want to request a read receipt. These and other options can be set on the Options dialog of the message. So maybe you want this dialog come up automatically for every email, which would save you one mouse click. (This macro works for up to Outlook 2010.)


tip  How to add macros to Outlook
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
  If TypeOf Item Is Outlook.MailItem Then
    ShowOptionDialog Item
  End If
End Sub

Private Sub ShowOptionDialog(oMail As Outlook.MailItem)
  Dim oBars As Office.CommandBars
  Dim oBtn As Office.CommandBarButton

  Set oBars = oMail.GetInspector.CommandBars
  Set oBtn = oBars.FindControl(, 5598)
  oBtn.Execute
End Sub
SAM SAM
SAM automatically sets the sending account, or sender address, and folder for sent items based on several criteria.
email  Send a message