0
I’m having a hard time putting a line break inside an automated email text by macro.
I create the e-mail with the following Cód:
"Necessitamos dos extratos do mês de " & Format((Month(Now) - 1), "mmm") & " das seguintes contas: " & vbNewLine & _
vbNewLine & " Empresa: " & empresa1 & " CNPJ: " & cnpj1 & vbNewLine & _
tipoConta & vbNewLine & " Conta: " & conta1 & " Agência: " & agencia1 & _
vbNewLine & " Empresa: " & empresa2 & " CNPJ: " & cnpj2 & vbNewLine & _
tipoConta & " : " & vbNewLine & " Conta: " & conta2 & " Agência: " & agencia2 & _
vbNewLine & _
vbNewLine & _
vbNewLine & _
"<FONT SIZE = 1.1><b>Essa mensagem foi gerada automáticamente e pode conter dados privados.</p></b>" & vbNewLinee & _
"<FONT SIZE = 1><b>E-mail gerado por Amadeu Gustavo | 55 5555-5555</p></b>"
I put the key after the line break to better visualize
and the generated email respects only one of the line break commands:
Is your email being sent as? HTML or Text? If it is with
.HtmlBody
, you should use html line breaks, such as <br>– danieltakeshi
worked well! if it is in text, I use the command
vbnewline?
– Amadeu
I’ve never done it in text, but I think it would work. Or use
Chr(10)
which is thevbLf
or theChr(13)
which is thevbCr
– danieltakeshi
beauty! thank you!
– Amadeu