hello on occasions my code goes out of sync and the send keys function fails and I end up with a stack of 100 emails. I would like to implement a button which can be used to send all open emails, i have seen this code but i get a run time 287 any help appreciated
VBA Code:
Sub SendOpenEmails()
Set OutApp = CreateObject("Outlook.Application")
CountMail = OutApp.Inspectors.Count
For i = 1 To CountMail
Set MailToSend = OutApp.Inspectors.Item(1).CurrentItem
MailToSend.Send
Next
Set OutApp = Nothing
End Sub