Hyperlink in Email doesn't work (1 Viewer)

Dumferling

Member
Local time
Today, 11:08
Joined
Apr 28, 2020
Messages
49
I want to email a hyperlink to selected persons. The hyperlink points to a corporate intranet and the only recipients are internal so the email should allow it. The hyperlink is stored in a table as a hyperlink and the code pick it up and puts it in the .html of an email. It all works fine until I try to click on the hyperlink in the email and nothing happens. The hyperlink is there (I can see the hyplink if I hover) but it simply doesn't open a browser.

My code is:
vblLink = Me.LPLink


'Set appOutlook = CreateObject("Outlook.Application")
Set MailOutlook = appOutlook.CreateItem(olMailItem)

With MailOutlook
.BodyFormat = 2
.To = strList
'.cc = ""
'.bcc = ""
.Subject = "Regulatory Update"
.HTMLBody = "Hi <br> <br>'" & vblContent & "'<br> <br> <a href='" & vblLink & "'>Click to view update</a> <br> <br> Regards <br> <br>

It should work but it doesn't. Am I missing something? I am on Office 365.
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:08
Joined
Sep 21, 2011
Messages
7,748
Why not put all that into a string variable and then you can Debug.Print it, to make sure it is formatted correctly, THEN assign to .HTMLBody ?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:08
Joined
Oct 29, 2018
Messages
14,142
The hyperlink is there (I can see the hyplink if I hover) but it simply doesn't open a browser.
Does the cursor change to a hand icon when you hover over it? You could also try this test. Save the email as HTML file and see if the link works there.
 

Users who are viewing this thread

Top Bottom