Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send eMail with an image included

Status
Not open for further replies.

darall

Instructor
Aug 7, 2002
32
0
0
US
I have a click-button on a form that uses the form data to send an eMail.
This is working great, however I have been asked if the eMail can include an image header in the message like the company logo.

Is there any way to do this? I tried playing with pulling in an OLE table field with no success.

Here is the code I am using to send the eMail:
Code:
Private Sub SendMail_Click()
Dim ObjOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Dim C01_TO As String
Dim C01_Body As String
Dim C01_Subject As String



C01_TO = [BusEMail] & ";  " & [DirMgrEMail]
C01_Subject = "Thank you!"
C01_Body = "Dear " & [First] & "," & Chr$(13) & Chr$(13) & _
"As you know, we ask our clients for their feedback on the service they received after each IT Service Delivery transaction." & Chr$(13) & _
"Recently, a client identified you as someone who provided excellent service.  Your hard work and dedication provides great value to our organization and helps our clients focus on the needs of their customers." & Chr$(13) & _
"Specifically, the client stated:" & Chr$(13) & _
"     o " & [Comments] & " (Clarify case #" & [CaseNum] & ")" & Chr$(13) & Chr$(13) & _
"Our goal is to provide a superior client experience with every interaction.  Thank you for supporting our clients and providing great service." & Chr$(13) & _
"Keep up the good work!" & Chr$(13) & Chr$(13) & _
"Regards," & Chr$(13) & _
Forms!frmELT!ELT_First & Chr$(13) & Chr$(13) & _
Forms!frmELT!ELT_Full & Chr$(13) & _
Forms!frmELT!ELT_Title


'**creates an instance of Outlook
Set ObjOutlook = CreateObject("Outlook.application")
Set objEmail = ObjOutlook.CreateItem(olMailItem)

'**************************************************************
'*create string with email address
strFrom = Forms!frmELT!ELT_email
strEmail = C01_TO
strSubject = C01_Subject

strBody = C01_Body


'***creates and sends email
With objEmail
    .SentOnBehalfOfName = strFrom
    .to = strEmail
    .Subject = strSubject
    .Body = strBody
'Use .send to auto send or .display to preview before send
    '.Send
    .Display
    
   
End With
ysnSent = True

Set objEmail = Nothing
Exit Sub

End Sub

 
I forgot to mention I am using Access 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top