How to Batch Send Multiple Draft Emails with Outlook VBA

For some reasons, you may save many draft emails in your Outlook. This article will teach you how to batch send all of them or just selected ones via one click, which is created with Outlook VBA.

Sometimes, you may not hope to send out the emails right now. Therefore, you’ll save them in the Drafts mail folder and intend to send out them later. As usual, when you want to send out the drafts, you have to open them individually and hit “Send” button one by one. If there are a great amount of drafts to be sent, it’ll be quite time-consuming. Hence, many users hope that Outlook can permit them to send out all the drafts just by clicking one button. However, by default, there isn’t such a button. But you can apply Outlook VBA to create it. Here are the elaborate steps and VBA codes.

Batch Send All Draft Emails

  1. At first, launch Outlook application and press “Alt + F11” shortcuts.
  2. Then you will open the VBA editor window, in which you should open a new module.
  3. Subsequently, copy and paste the following VBA codes into it.
Sub SendAllDraftEmails()
    Dim objDrafts As Outlook.Items
    Dim objDraft As Object
    Dim strPrompt As String
    Dim nResponse As Integer
    Dim i As Long
 
    Set objDrafts = Outlook.Application.Session.GetDefaultFolder(olFolderDrafts).Items
 
    If objDrafts.Count > o Then
       strPrompt = "Are you sure to send out all the drafts?"
       nResponse = MsgBox(strPrompt, vbQuestion + vbYesNo, "Confirm Sending")
 
       If nResponse = vbYes Then
          For i = objDrafts.Count To 1 Step -1
              objDrafts.Item(i).Send
          Next
       End If
    Else
       MsgBox ("No Drafts!")
    End If
End Sub

VBA Codes - Send All Draft Emails

  1. After that, you can exit the VBA editor and proceed to add the VBA project to Quick Access Toolbar or ribbon. Here we will take Quick Access Toolbar as an example.
  • Firstly, go to “File” > “Options” > “Quick Access Toolbar” tab.
  • Then follow the steps shown in the picture below to add the new macro to Quick Access Toolbar.Add SendAllDraftEmails Macro to Quick Access Toolbar
  1. Finally you can back to main Outlook window. You will see the new button in Quick Access Toolbar.
  • If there is no item in the Drafts folder, when you click the button, you will receive a message like the following screenshot.No Drafts
  • But if there are items in the Drafts folder, you will receive a prompt, like the image below. As soon as you select “Yes”, Outlook will begin to send out all the drafts.Confirm Sending All Drafts

Batch Send Selected Draft Emails

If you hope to send the selected drafts only, then the above codes are unsuitable. You can use the following codes instead.

  1. Firstly, copy them into a new module.
Sub SendSelectedDraftEmails()
    Dim objSelection As Selection
    Dim strPrompt As String
    Dim nResponse As Integer
    Dim i As Long
 
    Set objSelection = Outlook.Application.ActiveExplorer.Selection
 
    If objSelection.Count > 0 Then
       strPrompt = "Are you sure to send out the selected " & objSelection.Count & " draft item(s)?"
       nResponse = MsgBox(strPrompt, vbQuestion + vbYesNo, "Confirm Sending")
 
       If nResponse = vbYes Then
          For i = objSelection.Count To 1 Step -1
              objSelection.Item(i).Send
          Next
       End If
    Else
       MsgBox ("No items selected!")
    End If
End Sub

VBA Codes - Send Selected Draft Emails

  1. Then add the new macro to Quick Access Toolbar as usual.
  2. Subsequently, you can select the target draft emails and hit the button, you will get a prompt like the image:Confirm Sending Selected Drafts
  3. Finally, as long as you click “Yes”, the selected draft emails will be sent out.

Dispose of Annoying Outlook Problems

Perhaps you have encountered multiple vexing Outlook issues. How can you get rid of them? As usual, you can try its inbuilt repair tool, Scanpst.exe. It is able to fix the small Outlook PST file issues. But if you unfortunately meet up with severe troubles, such as PST email damage, the inbox tool will not make effects. At that point, you have no choice but to employ a more preeminent tool, like DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including mdf error repair and outlook repair software products. For more information visit www.datanumen.com

Leave a Reply

Your email address will not be published. Required fields are marked *