Hi,
I am using an Access form and VBA to send multiple emails at the same time. Everything is working fine. However, now I would like to include some HTML code in the Email body as I would like to put a URL link as part of the text message to the recipient.
An idea of the HTML code I'd like to use in the email body is:
<a href="http://www.mywebsite.com">Please follow this link to my website</a>
Anyone can give me any ideas of how I can do this?
Below is the current VBA code I'm using:
Any feedback is greatly appreciated
Thanks!!
I am using an Access form and VBA to send multiple emails at the same time. Everything is working fine. However, now I would like to include some HTML code in the Email body as I would like to put a URL link as part of the text message to the recipient.
An idea of the HTML code I'd like to use in the email body is:
<a href="http://www.mywebsite.com">Please follow this link to my website</a>
Anyone can give me any ideas of how I can do this?
Below is the current VBA code I'm using:
Code:
Set objMessage = CreateObject("CDO.Message")
Set rsEmail = CurrentDb.OpenRecordset("qryEmailList")
rsEmail.MoveFirst
Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("Email").Value
Set objMessage = New CDO.Message
strBodyText = "Email body text"
objMessage.Subject = "Email subject title"
objMessage.From = "info@mydomain.com"
objMessage.To = strEmail
objMessage.TextBody = strBodyText
objMessage.Send
rsEmail.MoveNext
Loop
Set objMessage = Nothing
Set rsEmail = Nothing
Any feedback is greatly appreciated
Thanks!!