-1
Good morning, I’m having a problem creating the vba code, I can insert an e-mail body line, put the second line, but when I trigger the email, what should be the second line is together with the first, follows code below:
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
Set Corpo = Nothing
On Error Resume Next
Corpo = " Olá, segue dados do MTR Nº " & Textnummtr & " - " & Textdata & Chr(10)
Corpo = Corpo & " Item: " & cboitem & Chr(10)
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
'Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "[email protected]"
.CC = ""
.BCC = ""
.Subject = "MTR"
.HTMLBody = Corpo
.Send 'or use .Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Adds the tag
<br>
? Why email client reads HTML– Rodrigo Graça
See if these answers help you
– danieltakeshi
Um, right, so you’d have to use an entire email body in html? ?
– Rodrigo Silveira
Substitute
Chr(10)
for"<br>"
– danieltakeshi