在VBA电子邮件中添加新行 [英] Add new lines in VBA email

查看:100
本文介绍了在VBA电子邮件中添加新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Excel自动发送电子邮件,但是新的换行命令不起作用!我已经尝试过<br/>vbCrLfvbNewLine

I'm trying to send an email automatically through Excel, but the new line commands aren't working! I've tried <br/>, vbCrLf and vbNewLine

.HTMLbody = "Hello" & vbNewLine & "Please find attached the above invoices and backup" & vbNewLine & _
            "Any queries please let me know" & vbNewLine & "Regards" & vbNewLine & Signature

它始终只将Hello Please find attached the above invoices and backup Any queries please let me know Regards作为一行!

推荐答案

也许您可以尝试以下方法: 使用

May be you can try this instead: Use

.HTMLbody = "Hello" & "<br>" & "Please find attached the above invoices and backup" & "<br>"

代替vbnewline

instead of vbnewline

这篇关于在VBA电子邮件中添加新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆