troubleshooting Question

Send mail macro not working in Outlook 2013

Avatar of SJH
SJHFlag for United Kingdom of Great Britain and Northern Ireland asked on
OutlookMicrosoft ApplicationsVB ScriptOffice ProductivityMicrosoft Office
13 Comments3 Solutions2407 ViewsLast Modified:
I have been using the code below in a macro in Outlook 2003 to send a number of mail items selected in the Inbox at one time. The reason for doing this is that our accounts package outputs emails of customer statements into the inbox which in theory you then have to open up one at a time and send them individually. This macro allows us to select multiple emails and then just run the macro to send them.

Sub SendAll()
    Dim olkMsg As Outlook.MailItem, _
        intIndex As Integer
    For intIndex = Application.ActiveExplorer.Selection.Count To 1 Step -1
        Set olkMsg = Application.ActiveExplorer.Selection.Item(intIndex)
    Set olkMsg = Nothing
End Sub

Open in new window

However, we have just upgraded to Outlook 2013 and now the macro won't work. The error message "This method can't be used with an inline response mail item." appears and then when you go to Debug, "olkMsg.Send" is highlighted.

Can anyone provide alternative code to perform the same task that will work in Outlook 2013?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros