阅: 923 | 回: 1

-
积分:23
-
财富值:2
-
身份:普通用户
' 设置收件人和抄送人
objMessage.To = RecipientEmail
objMessage.CC = CCRecipientEmail
' 设置主题、姓名和正文
objMessage.Subject = MailSubject
objMessage.TextBody = "Dear " & Name & "," & vbCrLf & vbCrLf & MailBody
' 添加附件
If AttachmentPath <> "" Then
objMessage.AddAttachment AttachmentPath
End If
' 将邮件保存到草稿箱
objMessage.Fields.Item("urn:schemas:httpmail:saveas") = 2
objMessage.Fields.Update
' 发送邮件
objMessage.Send
' 释放对象
Set objMessage = Nothing
Next i
MsgBox "邮件已保存到草稿箱。"
objMessage.To = RecipientEmail
objMessage.CC = CCRecipientEmail
' 设置主题、姓名和正文
objMessage.Subject = MailSubject
objMessage.TextBody = "Dear " & Name & "," & vbCrLf & vbCrLf & MailBody
' 添加附件
If AttachmentPath <> "" Then
objMessage.AddAttachment AttachmentPath
End If
' 将邮件保存到草稿箱
objMessage.Fields.Item("urn:schemas:httpmail:saveas") = 2
objMessage.Fields.Update
' 发送邮件
objMessage.Send
' 释放对象
Set objMessage = Nothing
Next i
MsgBox "邮件已保存到草稿箱。"
End Sub
哪位大神帮我看看,如上标黄色的部分出错,怎么修正,谢谢
敬天爱人,成人达已