kirstieruchat
New Member
- Joined
- Oct 23, 2017
- Messages
- 4
Hi,
I am using the below VBA to try and send an email. The email is sending but there is no body in the email. It is just and email with a subject line.
Any help please?
Thanks
Kirstie
I am using the below VBA to try and send an email. The email is sending but there is no body in the email. It is just and email with a subject line.
Any help please?
Thanks
Kirstie
VBA Code:
Sub TESTEmailSender()
Dim OutApp As Object
Dim OutMail As Object
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "email@email.com"
.Subject = Sheet6.Range("B6").Value & " - " & "SDH Price Increase"
.Body = "Entity: " & Sheet6.Range("I3").Value & _
vbNewLine & vbNewLine & _
"Customer Email: " & Sheet6.Range("I7").Value & _
vbNewLine & vbNewLine & _
"Sales Manaager Email: " & Sheet6.Range("I10").Value & _
vbNewLine & vbNewLine & _
vbNewLine & vbNewLine & _
vbNewLine & vbNewLine & _
vbNewLine & vbNewLine & _
vbNewLine & vbNewLine & _
"Dear " & _
vbNewLine & vbNewLine & _
"You last updated the NBRT on " & Cells(cell.Row, "F").Value & "." & vbLf & Cells(cell.Row, "G").Value & _
vbNewLine & vbNewLine & _
Cells(cell.Row, "E").Value & _
vbNewLine & vbNewLine & _
Sheet10.Range("G30").Value & _
vbNewLine & vbNewLine & _
"Many Thanks," & _
vbNewLine & vbNewLine & _
"K"
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub