View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default HELP: email file path as a hyperlink in outlook body

That's the purpose of the doing the replace. Instead of two separate strings,
you have a long string.

Did the hyperlink work when you used this?

If no, did you include the "File:////" stuff?

sam wrote:

Thanks for helping dave,

When i use: Replace(Me.filename.value, " ", "%20") I see "%20" between the
space.
like this:

123%20abc (123 abc: being the original file name)

And yes, Me.filename.value is a textfield in the userform, And I am saving
the file with that field name as the file name

"Dave Peterson" wrote:

I'm not sure what me.filename.value (textbox on a userform???) is, but maybe...

(This is untested...)

dim myFileName as string
myfilename = replace(me.filename.value, " ", "%20")

....
'don't forget the trailing backslash for the path.
..body = "hyperlink: c:\documents\" & myfilename

=========

I would have thought that:
..body = "hyperlink: file:\\\\c:\documents\" & myfilename

Would work better...(But it's still untested)


sam wrote:

Hi All,

I am trying to send a file path as a hyperlink in outlook once user clicks
"Submit" on an excel userform.

I am able to send the path, but the hyperlinking doesnt work on all of the
path, maybe because of a space in the file name?

Here is what I have so far..

With OutMail
.to = "
.CC = ""
.BCC = ""
.Subject = "Hyperlink test "
.Body = "Hyperlink: " & "C:\Documents" & Me.FileName.Value

.Send

Here Me.FileName.value is the actual file name that it will be saved with.
The file name has a space somethign like "abc 123"

Hope I made it clear.

Thanks in advance


--

Dave Peterson
.


--

Dave Peterson