Link in e-mail

M

Mike

Hi.

I am having trouble getting a hyperlink to appear in an e-mail. The code
all seems to work, but only the text of the link appears. I want this to be
an actual link that the recipient can click on.

Any ideas?

'Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

strbody = "Folks," & vbNewLine & vbNewLine & _
"The all orgs output file has been updated." & vbNewLine & _
"" & vbNewLine & _
"\\Spartanburg\shared\Production\Productivity\2008 Production
Weekly\AAR Output\all orgs - output - daily.xls " & vbNewLine & _
""


On Error Resume Next
With OutMail
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "All Orgs - Output - Daily"
.Body = strbody

'This is where I'm having problem. I want to hyperlink the file
'Should this be after the strbody? I tried after the strbody and it
did not work.
ActiveWorkbook.Follow.Hperlink.Follow Address:= _

"\\Spartanburg\shared\Production\Productivity\2008%20Production%20Weekly\AAR%20Output\all%20orgs%20-%20output%20-%20daily.xls" _
, TextToDisplay:= _
("\\Spartanburg\shared\Production\Productivity\2008 Production
Weekly\AAR Output\all orgs - output - daily.xls")

'You can add a file with this
'.Attachments.Add
("\\Spartanburg\shared\Production\Productivity\2008 Production Weekly\AAR
Output\all orgs - output - daily.xls")
.Send 'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = 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