I am creating a macro to resend email messages. All you have to do is select the email and click the macro button and the email is sent. Everything works fine except to the fact that the original message(s) get deleted or get moved to the sent items folder.
How do i prevent the message from being deleted? I just want a copy to the "sent items" folder. I do not want to delete the original message.
Here is the macro:
Sub ResendThis()
Dim objSelection As Outlook.Selection
Dim myItem As Outlook.MailItem
Dim objActionsMenu As Office.CommandBarControl
Dim olResendMsg As Outlook.MailItem
Set objSelection = Application.ActiveExplorer.Selection
On Error Resume Next
For Each myItem In objSelection
myItem.Display
Set olResendMsg = Application.ActiveInspector.CurrentItem
olResendMsg.Subject = "EMAIL RESEND TEST"
olResendMsg.HTMLBody = "EMAIL CONTENT" & myItem.HTMLBody
olResendMsg.Send
myItem.Close olDiscard
Next
Set myItem = Nothing
Set objActionsMenu = Nothing
Set olResendMsg = Nothing
End Sub
The "Send" Method sometimes moves the message to the "sent items" folder and Sometimes the message simply disappears.