Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Location
    Yorkshire UK
    Posts
    76

    Unanswered: Sending an E-mail

    I have a form showing customer details.

    On the doubleclick event of the 'customer e-mail address' text box, I have the following code:

    DoCmd.SendObject , , , [ContactEmail]

    So when I double click, Outlook opens and puts the e-mail address into the e-mail for me. I can then type a message and press send in Outlook.

    My problem is that when I then look at my sent folder within Outlook, if the customer's e-mail address is NOT in my contacts file, then it does not show me where the email has been sent. The TO: part of the e-mail is totally blank and there is no way of seeing where it went.

    Can anyone offer any help on this?

    Thanks
    Simon

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by Jabber View Post
    I have a form showing customer details.

    On the doubleclick event of the 'customer e-mail address' text box, I have the following code:

    DoCmd.SendObject , , , [ContactEmail]

    So when I double click, Outlook opens and puts the e-mail address into the e-mail for me. I can then type a message and press send in Outlook.

    My problem is that when I then look at my sent folder within Outlook, if the customer's e-mail address is NOT in my contacts file, then it does not show me where the email has been sent. The TO: part of the e-mail is totally blank and there is no way of seeing where it went.

    Can anyone offer any help on this?

    Thanks
    Simon
    Simon,

    Try this alternative method:

    Code:
    
    Application.FollowHyperlink "mailto:" & Me.[ContactEmail]
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    Feb 2010
    Location
    Yorkshire UK
    Posts
    76
    Fantastic. Works properly now. Any idea why your code works and mine does not?

    Thanks
    Simon

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Yours is attempting to use SendObject while Coach's is relying on the operating systems intrinsic ability to translate a URI starting with "mailto: " into a directive to open your mail client.

    Change the line to this and I think it might make more sense:

    Application.FollowHyperlink "http://www.google.com"

    Or, alternately, put this in the address bar of your favorite web browser:

    Code:
    mailto:SomeGuy@SomeSite.com
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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