Question : How do i send a hyperlink via e-mail which contains an active hyperlink to the current file

Hi

I have a workbook and i want to send an automated e-mail to the user to remind them where the workbook is located.
(A new workbook is created and saved for the user in his name when he opens the master)

This is the sub for doing the e-mail

Sub SendAutoEmail()

Dim sEMailString As String
Dim sEMailStringCC As String
Dim sTitle As String
Dim sBody As String
Dim olApp As Object
Dim olMailItem As Object

Set olApp = CreateObject("Outlook.Application")
Set olMailItem = olApp.CreateItem(0)

sEMailString = "[email protected]"
sEMailStringCC = ""
sTitle = "Test  for " & Format(Date, "dd-mmm-yy")
sBody = "Please see attached hyperlink which will open your sheet for " & Date & Chr(13) & Chr(13) & _
ActiveWorkbook.Path & "\" & ActiveWorkbook.Name & Chr(13)


With olMailItem
    .To = sEMailString
    If sEMailStringCC <> "" Then .Cc = sEMailStringCC
    .Subject = sTitle
    .Body = sBody
    '.Display
    .Send


End With

End Sub


That creates the message but the hyperlink isnt active.

One other thing...... this works but he user gets a warning that an e-mail is being sent and he has to accept the warning.
As far as i know this cant be changed without changing PC setups etc but if i can take out this user intervention it would be good.



Can you help please??

Thanks

Gordon

Answer : How do i send a hyperlink via e-mail which contains an active hyperlink to the current file

GordonMasson,
I looked up "Types of hyperlinks" in the Outlook on-line help. This help topic said that putting file:// in front of the path & file name would create a clickable link. You need to surround everything with angle bracket symbols <> if your link may contain spaces or Unicode characters, e.g. .xls>
Brad
Random Solutions  
 
programming4us programming4us