Kamlesh Jain
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 !
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@
what can be the reason ?
Can anybody help plz ?
Thanks in advance !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER