利用vba将excel数据写入outlook邮件模板里

利用vba将excel数据写入outlook邮件模板里,第1张

Sub sendmail()
Dim rowCount,
endRowNo
Set objOutlook =CreateObject("OutlookApplication")
Set objMail =objOutlookCreateItem(olMailItem)
Set objMail =objOutlookCreateItem(olMailItem)
With objMail
To = Cells(1,2)Value'替换为邮件地址
Subject = Cells(2,2)Value'替换为邮件主题
Body = Cells(3,2)Value'替换为邮件内容
AttachmentsAdd ThisWorkbookFullName'替换为附件
Send
End With
Set objMail =Nothing
Set objOutlook =Nothing
End Sub

如果是多人的话,可以加一个循环,不懂可以问我。

以上就是关于利用vba将excel数据写入outlook邮件模板里全部的内容,包括:利用vba将excel数据写入outlook邮件模板里、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/9266731.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-26
下一篇 2023-04-26

发表评论

登录后才能评论

评论列表(0条)

保存