Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New England (Connecticut)
    Posts
    200
    Thanks
    1
    Thanked 0 Times in 0 Posts

    outlook with office 03 (03)

    I used to use a MAPI type method for sending emails with attachments consisting of files from my C: drive through outlook via access. That was in office 97. Our office has made a huge step in computer refreshing and purchased brand new machines and installed a fresh office 2003. The MAPI method does not seem to work any more as I believe that support went away after outlook 2000. Is there another method to process emails from access and attach files from my computer? I have done a search of this site and found many posts on emailling but none seem to address what I am looking to do. Thank you for any help you might be able to give.
    Kevin

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: outlook with office 03 (03)

    If you want to send a database object (table, query, report) as attachment, you can use File | Send To | E-mail recipient (as attachment), or its VBA equivalent DoCmd.SendObject.

    If you want to attach another file, you must control Outlook from Access using Automation. An example can be found in <post:=133,130>post 133,130</post:>.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New England (Connecticut)
    Posts
    200
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: outlook with office 03 (03)

    Fantastic !! Thank you. I only need one clarification. When I send it to one recipient with one attachment it works perfectly. When I add the other three recipients and one more attachment it does not work. (Format used for multiple recipients is "Call SendMail ("recipient1;Recipient2;Recipient3;Recipient4", "Subject"; "Message"; "Attachment1;Attachment2"). Any thoughts?
    Kevin

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New England (Connecticut)
    Posts
    200
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: outlook with office 03 (03)

    Hans,

    I have determined that the format with the multiple recipients works with one attachment. Does this method not support multiple attachments?

    Thanks
    Kevin

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: outlook with office 03 (03)

    The code from <post#=133130>post 133130</post#> does not provide for multiple attachments, but it can easily be modified to do so: replace the line

    .Attachments.Add Attachment, olByValue

    with the following code:

    intPos2 = 1
    intPos1 = InStr(intPos2, Attachment, ";")
    Do While intPos1 > 0
    .Attachments.Add Mid$(Attachment, intPos2, intPos1 - intPos2), olByValue
    intPos2 = intPos1 + 1
    intPos1 = InStr(intPos2, Attachment, ";")
    Loop
    .Attachments.Add Mid$(Attachment, intPos2), olByValue

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New England (Connecticut)
    Posts
    200
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: outlook with office 03 (03)

    thank you
    Kevin

Posting Permissions

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