The Not For Profit (NFP) organisation for which I volunteer as Access 2010 maintenance programmer, requires to automate the sending of reminders to fellow NFP organisations (clients) on a regular basis.
The targets of those EMails change every month - viz. Org_D, Org_J, Org_M and Org_Q this month, and next month it may be Org_E and Org_R etc. - for every month of the year a different set of targets, as we request updates for our records.
I have got a report that does all this within Access and that works fine, as long as I send to printer, from where the pages can be separated and sent to the individual organisation. Trying to EMail this report from the Access toolbar, sends ALL the pages in one report to all clients - not good!!!!
I have also got a report that does all this as a Mailmerge within Word 2010 using the AccessDB data, and that also works fine, as long as I send to printer, from where the pages can be separated and sent to the individual organisation. Trying to save / export to .pdf this report, also saves ALL the pages in one file, which again has to be printed and sent to the individual organisation - not the desired result either!!!!
In both of the cases described above, I am not sure how to split this report into individual .pdf files (per page) for sending as attachments or by EMail_Address if the report can be sent directly.
My problem comes when I try to send this report as an EMail using Access VBA.
These requests contain our organisation logo and other 'pretties' in graphic format (requirement), so 'DoCmd.SendObject' (suggested by many sites for EMailing from AccessVBA) is not adequate for the task, according to the MS Access Help.
I have the following Access VBA References / Libraries loaded / enabled:-Visual Basic for Applications
Microsoft Access 14.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
OLE Automation
Microsoft Office 14.0 Object Library
Microsoft Excel 14.0 Object Library
Microsoft Word 14.0 Object Library
Microsoft Outlook 14.0 Object Library
Microsoft Data Access Components Installed Version
I would prefer to bypass the need to interact in any way with Outlook or its contacts lists, as I am suspicious of security changes in future versions, future Outlook administrators getting too enthusiastic with security features some time down the track, ... etc.. If there was a way to send these using, preferably, Access ONLY, or Outlook or any other MS Office application, without using any 'other application' contact lists, due to ongoing maintenance issues, and any particular Outlook user (no one is immortal nor invulnerable to retrenchments etc.), I would be very interested. If needed, we may be willing to consider going outside MS Office, but only to an 'open source’ / free application, if there is something that would work.
The Outlook 2010 option:-If I send the report as PDF attachments, (one page attachment per client and specific to each client) then how do I get Outlook to select and attach the correct file name from the multiple attachment files in a 'print to PDF folder', and match those files to the clients EMail address as supplied by the AccessDB?
Given that the targets change every month (and can expand and contract as new clients join and old ones leave), the Outlook 'Contacts' list needs to be changed each month also, in unison with the AccessDB data. How to do this from Access2010 VBA?
The "outside of the MS Office suit" optionHow could this be achieved (SMTP?? - can everyone receive and read SMTP?)?
Would I still need to send the attachments or could the pages of the report be separated and emailed individually to the relevant recipient?
Can SMTP apps(?) send out the result of a "print_to_SMTP_printer" Access report, while splitting one clients data from the others - i.e. not sending all the report pages to ALL clients, where they should only be receiving one page relevant to their organisation?
All this is easy enough when sending the report to a printer, but automating this EMail process has had me stumped for the last six months!
I am not an Access (or indeed MS Office) expert but spent about a year creating an Access database for a client nearly 20 years ago (Access Version 2), so my knowledge of Access is somewhat dated & rusty, to put it mildly. I would therefore really appreciate any help - methodology, code, macro, .... etc., to accomplish this for these good people, so that they can help the local unemployed find work in our troubled rural economy.
Thanking you in anticipation
Alex