Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Link in e-mail

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 = "
.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\200 8 Production
Weekly\AAR Output\all orgs - output - daily.xls")

'You can add a file with this
'.Attachments.Add
("\\Spartanburg\shared\Production\Productivity\200 8 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link in e-mail Luke M Excel Programming 0 June 10th 09 01:58 PM
Creating a mail link Burger King Framingham Links and Linking in Excel 7 July 8th 08 10:29 PM
is it possible to link a cell in excel to a mail in outlook? bembel Excel Discussion (Misc queries) 4 October 24th 05 03:44 PM
Excel Form link to e-mail Masud New Users to Excel 1 May 27th 05 04:48 PM
Link to send file to an e-mail address -PJ Excel Discussion (Misc queries) 3 February 2nd 05 02:17 PM


All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"