M圜ounter & ” – Sending to District ” & Format(rs!DISTRICT, “000”) & vbCrLf & _ĭoCmd.OpenReport MyReport, acViewPreview,, MyFilterĭoCmd. If Len(Dir(MyPath_inLoop, vbDirectory)) = 0 Then MyPath_inLoop = MyPath & “D” & Format(rs!DISTRICT, “000”) Set rs = CurrentDb.OpenRecordset(“DistrictList”, dbOpenDynaset, dbReadOnly) Me.CurrentStatus = "Sending Reports: Completed." & vbCrLf & "Placed at: " & vbCrLf & "Q:PRODDATAReportsAllRecip" & vbCrLf & "S:SystemsReports" & vbCrLf & vbCrLf & Me.CurrentStatus Set fs = CreateObject("Scripting.FileSystemObject")įs.CopyFile MyPath & MyFilename, "Q:PRODDATAReportsAllRecip" & MyFilenameĭoCmd.OpenReport "1020_Report2", acViewPreview,, MyFilterįs.CopyFile MyPath & MyFilename, “Q:PRODDATAReportsAllRecip” & MyFilename Once you see it works, you can change True to False so that the file created is not opened after completion.ĭoCmd.OpenReport "1010_Report1", acViewPreview,, MyFilterĭoCmd.OutputTo acOutputReport, "", acFormatPDF, MyPath & MyFilename, False We have a Customer report that we are looking to attach to the email. Me.CurrentStatus = "Sending Reports." & vbCrLf & vbCrLf & vbCrLf & "=" & vbCrLf & Me.CurrentStatus In this post, we will be looking at how to send an Access report as an attachment. Using VBA, how do I export a report to PDF in Microsoft Access?Īccess 2010 option of opening report and outputting to PDF using the Access engine, not Adobe Acrobat Printer: see EXAMPLES
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |