Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SendObject and Oulook (Access 2002 SP-1)

    Background:
    I have a database where I would like to send a snapshot of a report via code. I built a Macro with the sendobject command and supplied all the necessary arguments. I then did a Save As to create a module. I placed the code behind a button on my form. When I click the button it looks like everything is going through its motions. It ask me for a profile, I choose Outlook. Outlook gives me a warning that an application is automatically sending an email, I choose not to cancel. I click the yes option when it becomes available. Access gives me the error message: Unknown message recipient(s); message not sent. I have entered my contact information and saved it in Outlook.

    Can anyone shed some light on this problem.

    Thanks in advance
    Tom

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SendObject and Oulook (Access 2002 SP-1)

    You'll need to post the code before anyone can be sure they're giving you the right answer. It sounds like the address you're entering isn't resolving properly.
    Charlotte

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendObject and Oulook (Access 2002 SP-1)

    Here is the line of code.
    DoCmd.SendObject acSendReport, "rptBugs", "SnapShotFormat(*.snp)", "tfarrington@mindspring.com", "cc", "bcc", "Bug Reported on: " & Now(), "Double Click on Snapshot.", False, ""

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SendObject and Oulook (Access 2002 SP-1)

    Your problem appears to be here: "Double Click on Snapshot." Unless SendObject has changed a lot between A2k and AXP, you've got an extra argument there where it expects a true/false EditMessage value.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SendObject and Oulook (Access 2002 SP-1)

    Don't put in the "cc" and "bcc". If you are not sending copies to anyone just leave these blank but retain the commas.
    Also, since the template argument at the end is blank leave it and its comma off.

    Your code will be

    DoCmd.SendObject acSendReport, "rptBugs", "SnapShotFormat(*.snp)", "tfarrington@mindspring.com",,, "Bug Reported on: " & Now(), "Double Click on Snapshot.", False
    David Grugeon
    Brisbane Australia

Posting Permissions

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