Hello i have to create a vba code to send email of the first row then next row then so on i have created a vba code but i have few issues the values in COLUMN A SHOULD GO TO THE "TO" FILED OF THE OUT LOOK and B C D E F G H should go to the body of the OUTLOOK please help me out and i will post my code below
Private Sub CommandButton1_Click()
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
On Error Resume Next
With OutlookMail
.To = Range("A2:A3")
.CC = ""
.BCC = ""
.Subject = "test"
.Body = "text" + " " + Range("B2") + " " + "something something" + " " + Range("C2") + " " + "whatever" + " " + Range("D2")
.Display
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub
Private Sub CommandButton1_Click()
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
On Error Resume Next
With OutlookMail
.To = Range("A2:A3")
.CC = ""
.BCC = ""
.Subject = "test"
.Body = "text" + " " + Range("B2") + " " + "something something" + " " + Range("C2") + " " + "whatever" + " " + Range("D2")
.Display
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub