Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    Philadelphia
    Posts
    9

    Unanswered: Sending Email Through Microsoft Access

    How Can I attach a document using Microsoft Access. I can send email, but I cannot send attachments with it. Here is the code that I am using at the moment. I am using a form and on the form are the bound fields. I am sending the email by clicking on a command button, and that executes the code. Could I use an OLE object to attach the documents? or how can have Access locate the document for Outlook to send?

    Private Sub SendEmail_Click()
    Dim email As Outlook.MailItem
    Set email = CreateObject("Outlook.Application").CreateItem(olM ailItem)
    email.To = [Forms]![DataEntry]![HomeEMail]
    email.Subject = EmailSubject
    email.Body = EmailMessage
    email.Send
    End Sub

  2. #2
    Join Date
    Sep 2003
    Location
    Texas
    Posts
    20
    What kind of attachment are you wanting to send? Is it a certain Word document? Maybe you can set up a template in Outlook.

    Is it a report from Access? This can be done by using a macro and the senditem action or from vba code.

    Or do you want to allow the user to choose from among various documents?

  3. #3
    Join Date
    Nov 2003
    Location
    Philadelphia
    Posts
    9
    Originally posted by RichardTX
    What kind of attachment are you wanting to send? Is it a certain Word document? Maybe you can set up a template in Outlook.

    Is it a report from Access? This can be done by using a macro and the senditem action or from vba code.

    Or do you want to allow the user to choose from among various documents?
    I want the user to be able to choose from various documents. So it could be a pdf or a word doument on the desktop or in thier "MyDocuments" somewhere. So when the person fills out the Subject line, and the Message body, they can also have an option of attaching a document. and then press send.

  4. #4
    Join Date
    Oct 2003
    Location
    São Paulo - Brazil
    Posts
    91
    Originally posted by TheGame7
    Sorry to jump your post, but on a similar note.

    How could that code be adapted so a report from within the database can be sent via e-mail with the message?

    Thanks.
    Hi guys

    Have u visited http://www.granite.ab.ca/access/email.htm ?

    It may help u.
    My environment: Windows XP/ Access 2000 - Using Microsoft DAO 3.6 Library

Posting Permissions

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