Results 1 to 4 of 4
  1. #1
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131

    Send a PDF via email.

    I poasted a similar question a few weeks back to find out why I would get a Run-Time error '7971' when I would click on a button to open the PDf. I used the command;



    Application.FollowHyperlink Me!ReportLink

    and that worked.

    Now I am trying to send the the PDF via email using the command

    DoCmd.SendObject acSendReport, Me!ReportLink, acFormatPDF, "", "", "", "Subject", "", True, ""

    And I am getting a Run-Time error '2059' Microsft Office Access cannot find the object with single quotes around the file location and name.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    SendObject is looking for the name of the report object you want to send, not a path to an existing file. It will create and send the PDF without saving it. If you want to send an existing file, you need to use a different method (automation, CDO, etc).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    Thanks. Do you have a command line that I can test to send an existing file?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    There is no one-line command that I know of. One method is to automate Outlook, presuming you have it. Here's one link:

    http://support.microsoft.com/?kbid=209948
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. VBA to Send email from Access
    By ped in forum Access
    Replies: 3
    Last Post: 08-11-2011, 05:37 PM
  2. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  3. send email to email addresses in database?
    By cnstarz in forum Access
    Replies: 5
    Last Post: 03-02-2011, 09:46 PM
  4. send email reminder
    By azaz in forum Forms
    Replies: 1
    Last Post: 12-26-2010, 08:35 AM
  5. send email from a form
    By maxbre in forum Programming
    Replies: 4
    Last Post: 11-12-2010, 01:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums