Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Apr 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Sending parts of a report to different email addresses

    Hi,

    I'm new to this site and I have an issue with sending different parts of a report to different email addresses.
    e.g. Is it possible to send only part of a report relating to Mr A to his email address and only part of the report relating to Mr B to his email address etc?

    I'm using Ms Access 2007.

    Please could anyone help with this?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts
    Yes it is possible.
    I would selectively choose Mr A's data and send the report to a PDF file then email that file as an attachment, then run Mr B's report to PDF and send that.
    You need to know VBA for this.

  3. #3
    New Lounger
    Join Date
    Apr 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, thanks for the reply.

    Please could you help with the vba code?

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts
    That's a very general question you asked, if you produce the report for Mr A does that give you all the data you need for Mr A, similarly for Mr B?
    Using a recordset I would just loop thru the people you require reports for and initiate the report using DoCmd.OpenReport or Docmd.OutputTo (cannot remember which) using acFormatPDF and selecting the recordsets data in the WHERE clause, then using automation for Outlook send the email with the PDF file as an attachment.

  5. #5
    New Lounger
    Join Date
    Apr 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your help, I've been able to sort this out.

    Many thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •