Results 1 to 2 of 2

Thread: e-mailing

  1. #1
    Join Date
    Sep 2002
    Posts
    79

    Unanswered: e-mailing

    Is there any way to send e-mails directly from my form in Access and then keeping a record of it for referring to that e-mail in the future.

    Thanks!

  2. #2
    Join Date
    Dec 2001
    Posts
    79
    SEND AN E-MAIL MESSAGE FROM ACCESS

    You need an e-mail program that uses MAPI, like Outlook Express:

    DoCmd.SendObject ,,,"ToJohn@doe.com",,,"Subject","Message",False

    The above example will put an e-mail message to "ToJohn@doe.com" into your outbox. To have the e-mail send window pop up, change the last parameter to "True". To send to more addresses, separate the addresses with a semicolon. Here's another example that shows where to put CC and Bcc addresses:

    DoCmd.SendObject , , , "ToJohn@doe.com;ToBill@doe.com","CcMary@doe.co m" ,"BccSue@doe.com" , "Subject", "Message", False

    E-MAIL THE OUTPUT OF A REPORT FROM ACCESS

    Here's an example of how to send the output of a report named "Sales By Order" via e-mail. If your report prompts you for parameters, you will be prompted for them when you run this command:

    DoCmd.SendObject acSendReport, "Sales By Order", acFormatRTF, "ToJohn@doe.com", , , "Subject", "Message", False

    The "acFormatRTF" parameter will send the report output in a format that can be read by MS Word. You can also use:

    "acFormatHTML" - Your sent report output will be opened with a web browser.
    "acFormatTXT" - Your sent report output will be opened with notepad, or wordpad.

    E-MAIL AN ATTACHMENT

    To include an attachment with your e-mail, you need to use automation because SendObject won't do this. Here's how to use automation to send an e-mail attachment:
    http://support.microsoft.com/support.../q209/9/48.asp

    To keep a record of your e-mail correspondence, you could write the subject, message body, and to/from information to a table after sending.

    Hope this helps,
    Peter De Baets
    Peter's Software - Microsoft Access Tools for Developers
    http://www.peterssoftware.com

Posting Permissions

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