Send Draft Emails in Outlook

KarelDeGrote

New Member
Joined
Dec 11, 2018
Messages
8
Hi all,

I have a macro for sending multiple draft emails in outlook, but since an update/migration by IT the macro is not working anymore, I got a error on line "objSelection.Item(i).Send".
I am working with outlook 2016.

Does someone know how to fix this? The full macro is:


Code:
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

Thanks for your help!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi, I just figured out the macro works fine, it's an outlook issue, deleting the email addresses and typing in these manually solved the issue, unfortunately I needed to do this for 20 emails. I suppose we can close this topic.
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,038
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top