Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2004
    Posts
    38

    Cool Unanswered: Sending reports on email

    Is there a way to automae sending of reports by email (as .snp format), with subject and everything an email needs?

    {dd+}

  2. #2
    Join Date
    Mar 2004
    Posts
    38

    Solution

    DoCMD.SendObject ..
    Silly me

  3. #3
    Join Date
    Mar 2004
    Posts
    82
    ...but DoCmd.SendObject will only allow you to send one report at a time...is there another method to attach several reports to an email and send them out?

  4. #4
    Join Date
    Mar 2004
    Posts
    38
    Quote Originally Posted by Jablonski
    ...but DoCmd.SendObject will only allow you to send one report at a time...is there another method to attach several reports to an email and send them out?
    From http://www.granite.ab.ca/access/email/sendobject.htm :

    SendObject's twenty limitations
    1) Limited message length (255 characters, I believe.)
    2) Cannot attach multiple file attachments
    ....

    So I guess not....

    {dd+}

  5. #5
    Join Date
    May 2004
    Location
    Moscow, Russia
    Posts
    29
    use MAPI library for sending messages with more than one attached files at a time

  6. #6
    Join Date
    Mar 2004
    Posts
    38
    Quote Originally Posted by alexeyK
    use MAPI library for sending messages with more than one attached files at a time
    Care to elaborate?

  7. #7
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by dd_plus
    Is there a way to automae sending of reports by email (as .snp format), with subject and everything an email needs?

    {dd+}
    dd_plus,

    Here is one way of sending reports from access via email, and I am sure there are more fancier ways of doing it but then I am not an expert yet. Check it out:
    Code:
    '------------------------------------------------------------
    ' Send Modified Report to all involved for daily meetings
    'Hope this helps you some 
    '------------------------------------------------------------
    Function SendModifiedRpt()
    On Error GoTo SendModifiedRpt_Err
    
    .               (1)                                            (2)                              (3)                               (4)
        DoCmd.SendObject acReport, "rptProductionRpt3", "SnapshotFormat(*.snp)", "Bill Brody, John Smith, Kenneth Howard", "", "", "Production Report Update", "Updated Production Report", True, ""                                             (5)
             (6)                     (7)
    
    SendModifiedRpt_Exit:
        Exit Function
    
    SendModifiedRpt_Err:
        MsgBox Error$
        Resume SendModifiedRpt_Exit
    
    End Function
    
    ObjectType (1)
    
    ObjectName (2)
    
    OutputFormat (3)
    
    SendingTo: (4)
    
    Subject  (5)
    
    MessageText  (6)
    
    Edit Message before sending? (7)
    have a nice one and hope this helps some,
    Bud

  8. #8
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    dd_plus,

    Sorry, that didn't come out like it looked when I pasted it, but take a look at what I attached, looks a bit clearer.
    Bud
    Attached Files Attached Files

  9. #9
    Join Date
    May 2004
    Location
    Moscow, Russia
    Posts
    29

    multi -attachment

    for send multi -attachment message :

    1. create object Mapi session
    2 create object mapiMessages
    3 set msg parameters
    4 seng msg
    5 close session
    6 set all objects = nothing

    sample code : http://kozin1.narod.ru/newsite/index.html?sendmapi.htm



    .

  10. #10
    Join Date
    Mar 2004
    Posts
    82
    Hi,
    A couple explanations?
    If I have a dozen report snapshots, where is this indicated in the mail attachment type? Could you give a specific example?
    Thanks,
    J.

  11. #11
    Join Date
    May 2004
    Location
    Moscow, Russia
    Posts
    29
    Msgs.AttachmentIndex = 0
    Msgs.AttachmentPathName = "c:\1.snp"
    Msgs.AttachmentPosition = 0

    Msgs.AttachmentIndex = 1 'next number !!!
    Msgs.AttachmentPathName = "c:\2.snp"
    Msgs.AttachmentPosition = 1 'next number !!!

    Msgs.AttachmentIndex = 2 'next number !!!
    Msgs.AttachmentPathName = "c:\3.snp"
    Msgs.AttachmentPosition = 2 'next number !!!

    ...

    Msgs.AttachmentIndex = 11 'next number !!!
    Msgs.AttachmentPathName = "c:\12.snp"
    Msgs.AttachmentPosition = 11 'next number !!!

  12. #12
    Join Date
    Mar 2004
    Posts
    82
    Thank you.
    J.

  13. #13
    Join Date
    Mar 2005
    Posts
    18
    Quote Originally Posted by alexeyK
    for send multi -attachment message :

    1. create object Mapi session
    2 create object mapiMessages
    3 set msg parameters
    4 seng msg
    5 close session
    6 set all objects = nothing

    sample code : http://kozin1.narod.ru/newsite/index.html?sendmapi.htm



    .
    Someone please copy what is on the URL above and paste it to a word document. Either my internet censors is filtering this site out or it truly is a 403 error.

    Thank you.

    Frosty
    (Frosty was taken, so hand to settle for FrostyFree)

Posting Permissions

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