Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003

    Unhappy Unanswered: Please help with send to email

    I am attempting to send a report created in Access 2000 to Outlook Express 6.0 but upon doing so, I receive the following error message, "Microsoft can't open the mail session."
    Perhaps a mapi problem?

    I am utilizing Windows XP Pro as my operating system and am a complete newbie with Access 2000, but am willing to learn with a bit of guidance...

    Any ideas would be greatly appreciated!


  2. #2
    Join Date
    Apr 2003

    You don't say if you are attempting this manually (from the menu - File>Send To>Mail Recipient (as Attachment)…) or via VBA.

    If you want to use VBA you may wish to try the code below, you could drive the function from a macro or a button on a menu.

    Public Function AutoReportsEmail()
    Dim strTo As String
    Dim strSubject As String
    Dim strMessage As String
    Dim strName As String
    Dim EditMessage As Boolean

    strTo = ""
    strSubject = "User Details"
    strMessage = "The attachment contains User Details"
    EditMessage = True

    'Run report and email
    DoCmd.SetWarnings False
    DoCmd.SendObject acSendReport, "rptUserDetails", acFormatSNP, strTo, , , strSubject, strMessage, EditMessage
    DoCmd.SetWarnings True
    End Function



  3. #3
    Join Date
    Oct 2002
    Leicester - UK
    so much wasted space all you need is:

    Public sub AutoReportsEmail()

    DoCmd.SendObject acSendReport, "rptUserDetails", acFormatSNP, "" , , , "User Details", "The attachment contains User Details", true

    end sub

    and unless your returning a value it should be a sub not a fuction
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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