[AccessD] Email - Attachments

Tony Septav iggy at nanaimo.ark.com
Sat Feb 13 10:35:11 CST 2010


Hey Dan
Thanks
Duh (to myself)??? I have been using ShellExecute to open up the user's 
EMailer, found you cannot use attachments.  What I am kind of looking at 
is simply opening their Emailer (generic) and automatically filling in 
the information for them, they can manually send it.

I was kind of hoping that I could simply do this without making it 
Outlook specific etc.
I will keep your info for further reference.


Dan Waters wrote:

>Hi Tony,
>
>This part of what I use:
>
>Set outApp = CreateObject("Outlook.Application")
>Set outMail = outApp.CreateItem(olMailItem)
>
>With outMail
>
>    If stgAttachmentList <> "" Then
>        Do While stgAttachmentList <> ""
>            If InStr(stgAttachmentList, ";") <> 0 Then
>                .Attachments.Add Left(stgAttachmentList,
>InStr(stgAttachmentList, ";") - 1)
>                stgAttachmentList = Mid(stgAttachmentList,
>InStr(stgAttachmentList, ";") + 1)
>            Else
>                .Attachments.Add stgAttachmentList
>                stgAttachmentList = ""
>            End If
>        Loop
>    End If
>    
>End With
>
>This is part of a procedure which handles all Outlook emails.  I pass in the
>stgAttachmentList, which is a string of one or more full paths to the files
>I want to attach, and I've separated each path with a semicolon.
>
>Should work!
>Dan
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav
>Sent: Saturday, February 13, 2010 9:47 AM
>To: Access Developers discussion and problem solving
>Subject: [AccessD] Email - Attachments
>
>Hey All
>I know this has been discussed many times. But I was wondering if there 
>was simple code available to send an EMail with several attachments.  I 
>have been using some clean old code that Shamil  and I discussed years 
>ago.  It detects the user's EMailer and opens it up. You can automate 
>the  MailTo,  Subject and Body text, but you cannot automate the ability 
>to add attachments. Works like a beauty and because it was only one 
>converted PDF file at a time, the user didn't mind manually adding an 
>attachment.  But now we have a to send a series of quarterly reports.
>
>Thanks
>  
>




More information about the AccessD mailing list