With the generous help of this forum I currently have a 2010 access db which will export individual grouped reports as PDF.
I was wondering whether I could take this a step further and email each report to a recipient as well.
So if each report had say an 'EmailAddress' field included, is it possible to email the report as a PDF to the address listed in this field?
If that's not possible I don't know whether there could be another way to approach it with Powershell or Excel VBA maybe to match a code in the report file name to an external spreadsheet and email from there? I don't really know the limitations.
Any advice from the experts of how to begin to approach this would be very much appreciated.
For reference, with the help I so far have:
Private Sub Command2_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT DISTINCT [Account], [InvoiceNum] FROM [ContactTotals] WHERE (((Contracts.SelectedPrint)=True)) ORDER BY [Account];", dbOpenSnapshot)
Do While Not rst.EOF
strRptFilter = "[InvoiceNum] = " & Chr(34) & rst![InvoiceNum] & Chr(34)
DoCmd.OutputTo acOutputReport, "InvTotal", acFormatPDF, "C:\Scripts" & "\" & rst![Account] & " - " & rst![InvoiceNum] & ".pdf"
Set rst = Nothing