[AccessD] Attach Database Using SendObject

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Wed Sep 17 11:44:35 CDT 2003


Lonnie:

Very similar to what I use but I'm trying to get away from using Outlook.  That's why I though of SendObject because it should trigger whatever the user's default mail client is.  I think.

Rocky

  ----- Original Message ----- 
  From: Lonnie Johnson 
  To: Access Developers discussion and problem solving 
  Sent: Wednesday, September 17, 2003 9:21 AM
  Subject: Re: [AccessD] Attach Database Using SendObject


  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


------------------------------------------------------------------------------


  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030917/cdf259af/attachment-0001.html>


More information about the AccessD mailing list