Hi, I have a macro that upon selecting certain rows in a sheet sends a mail to various recipients.
Please can you help me modify the code so it also creates a single sheet with the selected rows for which a mail is sent and adds news rows to it when ever the macro is actioned?
Thank you.
Please can you help me modify the code so it also creates a single sheet with the selected rows for which a mail is sent and adds news rows to it when ever the macro is actioned?
Thank you.
VBA Code:
Sub ExcelToOutlookSR()
Dim mApp As Object
Dim mMail As Object
Dim SendToMail As String
Dim MailSubject As String
Dim mMailBody As String
For Each r In Selection
SendToMail = Range("A" & r.Row)
MailSubject = Range("J" & r.Row)
mMailBody = Range("K" & r.Row)
Set mApp = CreateObject("Outlook.Application")
Set mMail = mApp.CreateItem(0)
With mMail
.To = SendToMail
.Subject = MailSubject
.Body = mMailBody
.Send
End With
Next r
End Sub