Greetings, all.
I have tried without success to put an active link to a URL in the body of an email.
I'm simply going through a database of email addresses and sending each one an email asking to click on a link to go someplace really cool and awesome.
Instead of descriptions, here's the code:
(The spaces between the "<" & ">" are on purpose so the code doesn't try to execute.)
When I do this, I get the body of the email exactly as I want it, but the link refuses to show up.
I'm sure it's something vibrantly stupid or else I wouldn't be missing it.
Thanks to all who try, success or not.
I have tried without success to put an active link to a URL in the body of an email.
I'm simply going through a database of email addresses and sending each one an email asking to click on a link to go someplace really cool and awesome.
Instead of descriptions, here's the code:
Rich (BB code):
For i = 2 To x
If Range("A" + CStr(i)) = "" Then GoTo 27
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 'CDO Source Defaults
On Error GoTo 27 'Bad address bailout
Set Flds = iConf.fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
= "MY-EXCHMAIL.massive"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
StrBod = "< HTML >"
StrBod = StrBod & "< HEAD >< /HEAD >"
StrBod = StrBod & "< BODY >"
StrBod = StrBod & "Dear Valued People(s),< p >< p >"
StrBod = StrBod & "Blahblahblah.< p >< p >"
StrBod = StrBod & "Blahblahblah..< p >< p >"
StrBod = StrBod & "Please click on the link below for more information.< p >< p >"
StrBod = StrBod & "Sincerely,< p >< p >"
StrBod = StrBod & "Your Marvelous Friends< p >< p >"
StrBod = StrBod & "< a href = http://www.wxyz.com/and/so_on/and/so_forth.html >< /a >"
StrBod = StrBod & "< /BODY >"
StrBod = "< /HTML >"
End If
Subj = "Howdy, folks"
EML = Range("B" + CStr(i)) 'Email address record
With iMsg
Set .Configuration = iConf
.To = EML
.CC = ""
.BCC = ""
.From = "Us@OurOutbox"
.Subject = Subj
.HTMLBody = StrBod
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
27 Next
(The spaces between the "<" & ">" are on purpose so the code doesn't try to execute.)
When I do this, I get the body of the email exactly as I want it, but the link refuses to show up.
I'm sure it's something vibrantly stupid or else I wouldn't be missing it.
Thanks to all who try, success or not.