![]() |
#1
|
|||
|
|||
![]()
Hi guys
I've seen a lot of complicated VBAs to achieve sending selected drafts, however I'm working on this at the moment... I'm stuck at this part that's not working: For Each Draftmail In xSelection Draftmail.Send Next Any thoughts would be really welcome! Full code is below. Thanks James Sub SendSelectedDraftEmails() Dim xSelection As Selection Dim xPromptStr As String Dim xYesOrNo As Integer Dim i As Long Set xSelection = Outlook.Application.ActiveExplorer.Selection If xSelection.count > 0 Then xPromptStr = "Are you sure to send the selected " & xSelection.count & " draft item(s)?" xYesOrNo = MsgBox(xPromptStr, vbQuestion + vbYesNo) If xYesOrNo = vbYes Then For i = xSelection.count To 1 Step -1 For Each Draftmail In xSelection Draftmail.Send Next Next MsgBox "Successfully sent " & xSelection.count & " messages" End If Else MsgBox "No drafts selected!" End If End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA to change 'From' on drafts | JamesWood | Outlook | 5 | 02-15-2021 05:10 AM |
word 2016 won't change to drafts for default view | infonutt | Word | 0 | 07-21-2017 10:31 AM |
![]() |
Bansaw | Outlook | 2 | 07-28-2011 08:45 AM |
autosaving drafts with digital signature in outlook 2010 | lvovich | Outlook | 0 | 04-11-2011 12:40 AM |
Sent Items in Saved in Drafts | trish@25by7.com | Outlook | 1 | 11-05-2010 02:33 AM |