Sub SendEmail()
Dim OutlookApp As Object
Dim OutlookItem As Object
Set OutlookApp = CreateObject("outlook.Application")
Set OutlookItem = OutlookApp.CreateItem(olMailItem)
Sheets("Senemail").Select
Receiver = [b1].Value
Receiver2 = [b5].Value
SubjectTex = [b2].Value
BodyText = [b3].Value
AttchadObject = [b4].Value
On Error GoTo SendEmail_Error
With OutlookItem
.SendUsingAccount = "northordercn@outlook.com"
.To = Receiver
.CC = Receiver2
.Subject = SubjectText
.Body = BodyText
If AttchadObject <> "" Then
.Attachments.Add AttchadObject
End If
.Send
End With
SendEmail_Exit:
Exit Sub
SendEmail_Error:
MsgBox Err.Description
End Sub
为什么没有调用我写在程序里的sendusingaccount账号发送邮件,还是用了我默认的账号呢
你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答
本次提问扣除的有问必答次数,已经为您补发到账户,我们后续会持续优化,扩大我们的服务范围,为您带来更好地服务。