Link to home
Start Free TrialLog in
Avatar of Kamlesh Jain
Kamlesh JainFlag for India

asked on

Sending email from List Data

Hello,
New to this and VBA programming as well....
i am trying to send email, from list of customers (data is in list format). Below is the code :

Private Sub cmd_send_email_Click()
If Not IsNull(EmailID) Then
 On Error GoTo cmd_send_email_Click_Err
    Dim strTitle As String
    Dim strEmailAddress As String
    Dim strClientName As String
     
strEmailAddress = Me.List0.Column(3)
     
     strClientName = Me.List0.Column(1)
     
MsgBox (strClientName) & " (stremailaddress)"
     
     
       
          strTitle = "Our Offers for Various Solvents  "
           
                     DoCmd.SendObject acSendNoObject, , acFormatHTML, strEmailAddress, , , strTitle
         
           
cmd_send_email_Click_Exit:
    Exit Sub
cmd_send_email_Click_Err:
    If Err.Number = 2501 Then
        MsgBox "The e mail hasn't been sent", _
        vbInformation, "Sending to " & Trim(strClientName) & " was cancelled"
    Else
        MsgBox Err.Description
    End If
    Resume cmd_send_email_Click_Exit
End If
    MsgBox "You can't send an e mail to someone" & Chr(13) + Chr(10) & _
    "without an e mail address ?", vbInformation, "ooops  :-)"

End Sub

Now the problem is that n MS Outlook 2013, instead of proper email id , say abc@yahoo.com is shown as    [abc@yahoo.com#mailto:abc@yahoo.com#]

what can be the reason ?
Can anybody help plz ?

Thanks in advance !
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kamlesh Jain

ASKER

Thanks a lot... it worked. !!