[AccessD] Attach Database Using SendObject

Lonnie Johnson prodevmg at yahoo.com
Wed Sep 17 11:21:48 CDT 2003


Here is some VBA that I use to send files from a network drive. Hope this helps...
 
    Dim appOutLook As Outlook.Application
        Dim MailOutLook As Outlook.MailItem
    Call SET_INACT_DATE_KS
    
        Set appOutLook = CreateObject("Outlook.Application")
        Set MailOutLook = appOutLook.CreateItem(olMailItem)
        With MailOutLook
            .To = "email address here"
            .BCC = "email address here" 
            .Subject = "Email Subject in Here"
            .Body = "***** This is a system generated email. Do not reply to sender. *****" _
            & vbNewLine & vbNewLine _
            & "Blah Blah Blah"
            .Attachments.Add "C:\MyFolderName\MyFile.mdb", olByValue, 1, "Attchment Name"
            .Send
        End With
 

        

Rocky Smolin - Beach Access Software <bchacc at san.rr.com> wrote:
Dear List:
 
Does anyone know if it is possible to attach a database to an email using SendObject?  Right now I send it using the Outlook object model but I don't want the user to be limited to using Outlook for their mail client.
 
MTIA,
 
Rocky Smolin
Beach Access Software
 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us




 




---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030917/33f62448/attachment-0001.html>


More information about the AccessD mailing list