Good day
I'd need to send a number of e-mails containing information on an Excel file (one e-mail per row to different recipients). The code below works up to the point where I want the value in the range C1:C3 to be included in the e-mail body (I almost certain the bold part is where the error lies but I can't figure out what exactly is wrong).
Any help is highly appreciated.
Thank you
Sub test()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
For Each cell In Worksheets("Sheet3").Range("A1:A3").Cells
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Cells(cell.Row, "A").Value
.CC = "test@testing.com"
.Subject = "project"
.Body = "Good day" & vbCrLf & "Kindly update the client tool for the local entity " & Worksheets("Sheet3").Range("C1:C3").Value & vbCrLf & "Thank you and best regards"
.display
End With
Set OutMail = Nothing
Next cell
End Sub
I'd need to send a number of e-mails containing information on an Excel file (one e-mail per row to different recipients). The code below works up to the point where I want the value in the range C1:C3 to be included in the e-mail body (I almost certain the bold part is where the error lies but I can't figure out what exactly is wrong).
Any help is highly appreciated.
Thank you
Sub test()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
For Each cell In Worksheets("Sheet3").Range("A1:A3").Cells
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Cells(cell.Row, "A").Value
.CC = "test@testing.com"
.Subject = "project"
.Body = "Good day" & vbCrLf & "Kindly update the client tool for the local entity " & Worksheets("Sheet3").Range("C1:C3").Value & vbCrLf & "Thank you and best regards"
.display
End With
Set OutMail = Nothing
Next cell
End Sub