Looking for Outlook 2013 update for Send Drafts Macro

Status
Not open for further replies.

Bren

New Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2010
Does anyone know of a way to get this macro to work in Outlook 2013 or do you have suggestions for a new method? We're currently using it in Outlook 2003 to send multiple e-mails from our Drafts folder.

----

Public Sub SendDrafts()

Dim lDraftItem As Long
Dim myOutlook As Outlook.Application Dim myNameSpace As Outlook.NameSpace
Dim myFolders As Outlook.Folders
Dim myDraftsFolder As Outlook.MAPIFolder

'Send all items in the "Drafts" folder that have a "To" address filled in.

'Setup Outlook

Set myOutlook = Outlook.Application
Set myNameSpace = myOutlook.GetNamespace("MAPI")
Set myFolders = myNameSpace.Folders

'Set Draft Folder.

Set myDraftsFolder = myFolders("SC").Folders("Drafts")

'Loop through all Draft Items

For lDraftItem = myDraftsFolder.Items.Count To 1 Step -1

'Check for "To" address and only send if "To" is filled in.

If Len(Trim(myDraftsFolder.Items.Item(lDraftItem).To)) > 0 Then

'Send Item

myDraftsFolder.Items.Item(lDraftItem).Send

End If
Next lDraftItem

'Clean-up

Set myDraftsFolder = Nothing
Set myNameSpace = Nothing
Set myOutlook = Nothing

End Sub
 

Bren

New Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2010
What happens when you try it? It's pretty basic and should work with outlook 2013.
Hi Diane,
We were able to get it working today, without making any changes. All we needed was the threat of your help (it's like what happens when your appliances stop working until the very second that a repairman sets foot on your premises. lol)

Thanks!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I'm not sure if that's good or bad. LOL

Was the problem with macro security settings? That's a common cause with new setups.
 

Bren

New Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2010
I'm not sure if that's good or bad. LOL

Was the problem with macro security settings? That's a common cause with new setups.
Hi Diane,
No, our Security settings were fine. It would run for our personal mailboxes but wouldn't run for our group's functional mailboxes. It would run fine with both types of mailboxes in Outlook 2003 but wouldn't in Outlook 2013. Same code. We wouldn't get error messages---it would just hang. Finally I just deleted the code (again, for like the 10th time) and this time it worked.
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
O looking to bring in all my folders from Outlook Express (XP) to Outlook 2013 Using Outlook 3
L Looking for help - want to try an alternative to Outlook? Outlook Wishlist 0
D Looking to move away from exchange to outlook.com Using Outlook 4
Aussie Looking for Outlook macro to Copy Recipient Names into Email Body Outlook VBA and Custom Forms 3
R Outlook Template: Looking to distribute a VBA Outlook template to other people Using Outlook 1
Q Looking for Outlook 2010 Close Event Id Exchange Server Administration 1
U Looking for a person/company that we can PAY for Outlook 2003 tech service Using Outlook 0
T I am looking for a Microsoft Outlook Email Stationery download? Using Outlook 5
D Microsoft Outlook not operating and is clouded looking Using Outlook 1
B Outlook 2007 at odd times shuts down then states it is looking for problem then starts up again Using Outlook 1
S Outlook 2003 (when looking at emails shows my name and not who sent the emails) Using Outlook 2
S Outlook wont load - looking for microsoft exchange Using Outlook 1
A Microsoft Outlook cannot open - it's looking for a connection Using Outlook 2
B looking for outlook in office 2007 home Using Outlook 0
S Looking for client-side method (Outlook 2007/Exchange 2007) for users to delete Outlook VBA and Custom Forms 2
P Outlook looking for Copy of Outlook.pst Outlook VBA and Custom Forms 1
B Looking to get the Recipient email address (or even the "friendly name") from an email I am replying to using VBA Outlook VBA and Custom Forms 4
B Looking to filter (or just find/search) for only messages that the sender has sent more than 1 messa Using Outlook 2
G Looking for help with our Organization Forms Library Outlook VBA and Custom Forms 1
peacepanda How to save attachment looking at the attachment name Outlook VBA and Custom Forms 1
M Looking for options and best practices for an Edge Server (Exchange or not) Exchange Server Administration 0
M Looking for trainer in Business Contact Manager BCM (Business Contact Manager) 0
B Looking for an add-in or a way to send automatic replies based off a list Using Outlook 2
J Looking for a solution (maybe an add-in) to easily track email conversations Using Outlook 3
I Looking for a productivity add-in similar to "Nostalgy" for Thunderbird Using Outlook 5
C Looking for way to tie a Business Contact to more than one Account BCM (Business Contact Manager) 5
J OL2003 Macro disables itself - looking for way to automate 'enable' Using Outlook 2
P Looking for Christmas Theme (thmx file) Using Outlook 5
W "Looking for credential tiles..." when connecting to Exchange 2007 Using Outlook 4
M I am looking for support options for taskmanager in 2010 Using Outlook 1
P Looking for suggestions regarding a multi-site high availability/disaster resistant design Exchange Server Administration 1
S Looking for feedback on this CAS Array testing plan Exchange Server Administration 2
R Complicated mixed exchange environment, looking to move to 2010! Exchange Server Administration 8
C Looking for Collaboration / Communication Tools Using Outlook 4
R Looking for my BCM backup files BCM (Business Contact Manager) 1
B Looking for email address under ItemSend event Outlook VBA and Custom Forms 6
S Looking for a Utility for Editting An Exported Rules (.rwz) File Using Outlook 6
U looking for feedback on installation process and on eMarking Assis Outlook VBA and Custom Forms 1
J Outlook 2010 Outlook/Win7 Client logging Event ID 36887 Using Outlook 0
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 13
P Scheduling a meeting in Outlook Outlook Wishlist 4
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
R Outlook 2019 Using Outlook 0
N Outlook Has Become Sluggish Using Outlook 14
HarvMan Outlook 365 Calendar Using Outlook 12
A calendar invites sent from Microsoft Outlook to Mac Outlook is not working Calendar Printing Assistant 2
L Outlook 2016 Contacts missing in Outlook 365 Using Outlook 1
Similar threads


















































Top