问题描述
Private Sub Command0_Click()
On Error GoTo Err_Handler
Dim oApp As New outlook.application
Dim oEmail As Outlook.MailItem
Dim fileName As String,todayDate As String
'Export report in same folder as db with date stamp
todayDate = Format(Date,"MMDDYYYY")
fileName = Application.CurrentProject.Path & "\Goodies_" & todayDate & ".pdf"
DoCmd.OutputTo acReport,"MYreport",acFormatPDF,fileName,False
'Email the results of the report generated
Set oEmail = oApp.CreateItem(olMailItem)
With oEmail
.Recipients.Add "myemail@gmail.com"
.Subject = "Free Gift"
.Body = "With Compliment"
.Attachments.Add fileName
.Send
End With
MsgBox "Email successfully sent!",vbinformation,"EMAIL STATUS"
End Sub
如何将我的报告中的每一页发送到报告的同一张表中列出的其他电子邮件收件人。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)