AccessForums.net is a forum dedicated to Microsoft Access, if you want to ask any Access related questions or help other members out, please join our community, the registration is free and takes only one minute.

Embedding .jpg image to email

Hello,

I have figured out how to embed an image to an auto generated email using the .HTMLBody property. But I also want to add text to the body of the email. Whenever I add text to the .Body property it doesn't appear. Then I thought about adding some vbNewLine's after the .HTMLBody property and then adding the text. It brings the text right under the image but I cant space it out any further or create more spaces for more text. If anyone could help me out I would appreciate it. I will post my code below:

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' Add the To recipient(s) to the message. Substitute
' your names here.
Set objOutlookRecip = .Recipients.Add("Recipient Name") '<--Recipient's name or email address
objOutlookRecip.Type = olTo
' Add the CC recipient(s) to the message.
'Set objOutlookRecip = .Recipients.Add("CC Recipient Name")
'objOutlookRecip.Type = olCC
' Set the Subject, Body, and Importance of the message.
.Subject = "This is an Automation test with Microsoft Outlook" '<--Subject
'.Body = "vbNewLine & vbNewLine & vbNewLine" & "NOTE: Some of you have may have been deactivated for 12+ months" & _
"of non-use. If you have trouble re-setting your password (or receive a database error when trying" & _
"to sign-in), just FORWARD this email to so we can reactivate your license."
'Use this to send the Email using the HTML Format
'.HTMLBody = "<HTML><H2><b>This is HTML Text in the BODY of the email</b></H2></HTML>"
.HTMLBody = "<HTML><Head></Head><Body><img SRC=\\cvty.com\dfs\Data\PFFS-BSU\Mark\DBs\Ascend\Logo.jpg></Body></HTML>" & vbNewLine & vbNewLine & "NOTE:" & _
"Some of you have may have been deactivated for 12+ months" & _
"of non-use. If you have trouble re-setting your password (or receive a database error when trying" & _
"to sign-in), just FORWARD this email to so we can reactivate your license."

I have just been trying this code to see if it will work and it is doing the same thing..it goes to the next line but that is it.

strMessage = "<html><body><span style='background:yellow;mso-highlight:yellow'>" & "NOTE: Some of you have may have been deactivated for 12+ months of non-use. If you have trouble re-setting your password (or receive a database error" & _
"when trying to sign-in), <u><b>just FORWARD this email</b></u> to <u>yyyyyyyyy.com</u> so we can reactivate your license. " & vbNewLine & vbNewLine & "</body></html>"