dharkangel
MIS
Hi,
I am trying to create a dynamic email message. The message will contain a summary of links and be sent to each user in a database. I cannot properly create the hyplinks inside the message. The code I've pasted below sends the email but it also displays the literal URL. so the email message looks like this:
Dear whoever,
You have the following actions due this week:
201<12<ETC.
The URL actually appears as a hyperlink but it does not go anywhere. All I am trying to do is display the list of ID's and allow the user to click on it to go to a detailed page of that ID, which is why I am trying to make this a URL
below is a snippet of my code:
EmailBody = "Dear " & UserName & "<br><br>The following actions are due this week:<br><b>QPT Actions</b><br><br>"
EmailBody = EmailBody & "<a href= & QPTRecordSet.Fields("theID") & ">" & QPTRecordSet.Fields("theID") & "</a><br>"
'SEND EMAIL
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = Email
.FROM = "admin@myserver.com"
.Subject = "Actions Due This Week: " & Date
.HTMLBody = EmailBody
.Send
End With
Set iMsg = Nothing
I am trying to create a dynamic email message. The message will contain a summary of links and be sent to each user in a database. I cannot properly create the hyplinks inside the message. The code I've pasted below sends the email but it also displays the literal URL. so the email message looks like this:
Dear whoever,
You have the following actions due this week:
201<12<ETC.
The URL actually appears as a hyperlink but it does not go anywhere. All I am trying to do is display the list of ID's and allow the user to click on it to go to a detailed page of that ID, which is why I am trying to make this a URL
below is a snippet of my code:
EmailBody = "Dear " & UserName & "<br><br>The following actions are due this week:<br><b>QPT Actions</b><br><br>"
EmailBody = EmailBody & "<a href= & QPTRecordSet.Fields("theID") & ">" & QPTRecordSet.Fields("theID") & "</a><br>"
'SEND EMAIL
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = Email
.FROM = "admin@myserver.com"
.Subject = "Actions Due This Week: " & Date
.HTMLBody = EmailBody
.Send
End With
Set iMsg = Nothing