View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Hyperlink in Email Body

hi Darrell

.Body = "file://Yourcomputer/YourFolder/Week2.xls"

If there are spaces use %20
.Body = "file://Yourcomputer/YourFolder/Week%202.xls"

So try to add file://

Ot create a html body

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Darrell Lankford" wrote in message
...

I have a spreadsheet that names and saves the file in a folder and the
below code creates an email to let an admin know that the file is
ready to be entered in a separate data base. Everything is working
except the hyperlink in the email. It puts the text path and name of
the file in the body of the email, but as text and not as a hyperlink.
If anyone can help with how I can turn the text into a hyperlink, it
would be greatly appreciated.


Sub email_Alert_Input_Rdy()

Dim objOL As New Outlook.Application
Dim objMail As MailItem
Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)


msg = "All," & Chr(13) & Chr(13)
msg = msg & "The Estimate is ready to be entered." & Chr(13)
msg = msg & "If you have any questions, let me know." & Chr(13) & Chr
(13)
msg = msg & "Thanks," & Chr(13) & Chr(13) & Chr(13)

‘THE BELOW LINE SHOULD BE THE HYPERLINK…
msg = msg & ActiveWorkbook.Path & "\" & ActiveWorkbook.Name & Chr(13)


addee = "

With objMail
.To = addee
.CC = CC
.Subject = “Estimate Ready”
.Body = msg
.Display
'.Send

'ActiveWorkbook.Close


End With
Set objMail = Nothing
Set objOL = Nothing




End Sub