![]() |
|
|
|
#1
|
|||
|
|||
|
Hi guys
Nevermind the above, I've come up with a workaround. Essentially I have ended up with a macro that sends all the drafts in a particular drafts folder (in this case, Merge Tools). I was also getting an 'inline' error whilst using this because I was viewing the draft it was trying to send, so I made it switch to the Inbox view before sending the drafts. Here's the code for anyone who wants it ![]() Sub SendAllMergeToolsDrafts() If MsgBox("Are you sure you want to send ALL the items in your Merge Tools drafts folder?", _ vbQuestion + vbYesNo) <> vbYes Then Exit Sub Dim myNamespace As Outlook.NameSpace 'Change view to Inbox to avoid inline error Set myNamespace = Application.GetNamespace("MAPI") 'Change view to Inbox to avoid inline error Set Application.ActiveExplorer.CurrentFolder = _ myNamespace.GetDefaultFolder(olFolderInbox) 'Change view to Inbox to avoid inline error Dim fldDraft As MAPIFolder, msg As Outlook.MailItem, intCount As Integer Set fldDraft = Outlook.GetNamespace("MAPI").GetDefaultFolder(olFo lderDrafts).Folders("Merge Tools") 'Sends all drafts in the Merge Tools folder only intCount = 0 Do While fldDraft.Items.count > 0 Set msg = fldDraft.Items(1) msg.Send intCount = intCount + 1 Loop If Not (msg Is Nothing) Then Set msg = Nothing Set fldDraft = Nothing MsgBox intCount & " messages sent", vbInformation + vbOKOnly End Sub |
|
|
|
Similar Threads
|
||||
| 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 |
My draft message gets deleted from drafts when I send it?
|
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 |