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:
Thanks for your help!
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!