I have several cells that I want to concatenate to send an email through excel
It turns out that every cell I would like to have line breaks but I am not able to
I have already used WrapText and Chr () but it is not working, can someone help me?
Dim outapp As Outlook.Application
Dim outmail As Outlook.MailItem
Dim linha As Integer
Dim folha_origem As String
Dim listamails As String
Dim email As String
'cria e chama os objetos
Set outapp = CreateObject("outlook.application")
Set outmail = outapp.CreateItem(olMailItem)
linha = 7
folha_origem = "Contactos Experts"
'desativar a mensagem de alerta
Application.DisplayAlerts = False
email = ""
While Sheets(folha_origem).Cells(linha, 4).Value <> ""
listamails = listamails & ";" & Sheets(folha_origem).Cells(linha, 4).Value
email = email & Chr(10) & Sheets(folha_origem).Cells(linha, 6).Value
linha = linha + 1
Wend
linha = 7
With outmail
'email do destinatário
.To = listamails
'titluo da mensagem
.Subject = email
'mensagem
.HTMLBody = Sheets(folha_origem).Range("F7").Value
'enviar anexos que não existem
'.Attachments.Add = Range("dshf
.Display
' .Send
End With
Application.DisplayAlerts = True