调用Outlook发送邮件[Access软件网]

- 编辑:admin -

调用Outlook发送邮件[Access软件网]

Optional BCC As String = "")Dim objOutlook As outlook.ApplicationDim objMail As MailItemSet objOutlook = New outlook.ApplicationSet objMail = objOutlook.CreateItem(olMailItem)With objMail.To = ToAddress'收件人.CC = CC'抄送.BCC = BCC'密件抄送.Subject = Subject'标题.Body = Body'正文If Attachment "" Then .Attachments.Add Attachment '附件.Send'发送End WithMsgBox "发送乐成!"End Function调用要领:OutlookSendEmail "收件人邮箱地点", Optional CC As String = ""。

"邮件正文","附件(可选)", Body As String。

Attachment As String = "",使用Outlook的默认账户来发送邮件,"密件抄送(可选)" access源码网店 , 时 间 :2018-07-15 09:37:32 作 者 : 易勋 ID:35404都市:上海 摘 要 :通过调用Office中的Outlook组件。

"抄送(可选)"。

Subject As String,。

正 文 : 前提:引用Microsoft Outlook xx(具体版本号)Object Library;配置Outlook的默认账户 函数: Public Function OutlookSendEmail(ToAddress As String,"邮件标题"。