Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 1202|回复: 0

EXCEL群发邮件,需要插入OUTLOOK中的签名,感谢!

[复制链接]
发表于 2022-9-6 15:40 | 显示全部楼层 |阅读模式
本帖最后由 神往之地 于 2022-9-6 15:42 编辑

以下代码可以正常群发邮件,就是没有OUTLOOK邮箱的签名,OUTLOOK中签名已设置。
请老师帮忙修改下,使用其可以自动插入签名。自己试着修改都没有成功,感谢!


Public Function sendmail(sendto As String, cc_emails As String, subj As String, mbody As String, filepath1 As String, filepath2 As String)
On Error Resume Next
Dim oLapp As Object
Dim oItem As Object
Set oLapp = CreateObject("Outlook.application")
Set oItem = oLapp.createitem(0)
With oItem
.Subject = subj
.To = sendto
.CC = cc_emails
.htmlbody = mbody
.Attachments.Add filepath1
.Attachments.Add filepath2
.Send
If Err.Number = 0 Then
sendmail = "发送成功"
Else
sendmail = "发送失败:" & Err.Description
End If
End With
Set oLapp = Nothing
Set oItem = Nothing
End Function

邮件.zip

15.48 KB, 下载次数: 3

excel精英培训的微信平台,每天都会发送excel学习教程和资料。扫一扫明天就可以收到新教程
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-17 21:19 , Processed in 0.217784 second(s), 11 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表