hyperlink in email

N

Nelson

Helllo, I am using the code below to send email from
Excel. I can't figure out how to inlcude a hyperlink.
TIA...

Public Sub Send_Email()
Dim olApp As Outlook.Application
Dim olNs As Outlook.NameSpace
Dim olMail As Outlook.MailItem
Dim i As Byte
Dim emailBody As String

Set olApp = CreateObject("Outlook.Application")
Set olNs = olApp.GetNamespace("MAPI")
olNs.Logon
Set olMail = olApp.CreateItem(olMailItem)

With olMail
For i = 1 To Range("Email_List1").Rows.Count
.Recipients.Add Range("Email_List1")(i)
Next i
.Subject = ActiveWorkbook.Name
'
'Build email body
'
If (pubNewReqs = True) Then
emailBody = pubNewReqCnt - 1 & " Regulatory
Requirements have been added for " & Range
("Regs_For").Value & "."
Else
emailBody = Range("Regs_For").Value
& "Regulatory Requirements have been updated."
End If
.Body = emailBody

.Links.Add = "Network or URL path to file"

.OriginatorDeliveryReportRequested = False
.ReadReceiptRequested = False
.Recipients.ResolveAll
.Send
End With

Set olNs = Nothing
Set olApp = Nothing
Set olMail = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top