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
Microsoft OfficeOutlookOffice ProductivityMicrosoft ApplicationsVB Script
13 Comments1 Solution2407 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)
        olkMsg.Send
    Next
    Set olkMsg = Nothing
End Sub

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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
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 1 Answer 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