I am using the following code to send an email with contents from the spreadsheet from the push of a button:
I would like to have the information that goes into the body of the email separated by a carriage return or new line but i cannot figure out how to do it.
looking to do the following:
.Body = Range("A8").Text & Range("B8").Text (carriage return here so the next cells are on a new line) Range("A21").Text & Range("b21").Text
Thank you in advance for any help or suggestions.
Paul
Code:
Sub Button13_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
.To = "XXXX@XXXX.com"
.CC = ""
.BCC = ""
.Subject = ""
.Body = Range("A8").Text & Range("B8").Text & Range("A21").Text & Range("b21").Text
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I would like to have the information that goes into the body of the email separated by a carriage return or new line but i cannot figure out how to do it.
looking to do the following:
.Body = Range("A8").Text & Range("B8").Text (carriage return here so the next cells are on a new line) Range("A21").Text & Range("b21").Text
Thank you in advance for any help or suggestions.
Paul