Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP: email file path as a hyperlink in outlook body

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default email file path as a hyperlink in outlook body

Try

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


--

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


"sam" wrote in message ...
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default HELP: email file path as a hyperlink in outlook body

Have you tried this

..Body = "Hyperlink: " & "C:\Documents" & _
Replace(Me.FileName.Value ," ","%20")

"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

  #4   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP: email file path as a hyperlink in outlook body

Thanks for the help Barb, I cannot replace the space with anything else, The
file is saved with a space in between, "123 455" and I have to get it to work
as a link with the space in the file name,
actually the whole path with the file name as a hyperlink.


"Barb Reinhardt" wrote:

Have you tried this

.Body = "Hyperlink: " & "C:\Documents" & _
Replace(Me.FileName.Value ," ","%20")

"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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default HELP: email file path as a hyperlink in outlook body

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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default HELP: email file path as a hyperlink in outlook body

The %20 is hex for the space character.

It's a way to include the space character into the link without confusion.



sam wrote:

Thanks for the help Barb, I cannot replace the space with anything else, The
file is saved with a space in between, "123 455" and I have to get it to work
as a link with the space in the file name,
actually the whole path with the file name as a hyperlink.

"Barb Reinhardt" wrote:

Have you tried this

.Body = "Hyperlink: " & "C:\Documents" & _
Replace(Me.FileName.Value ," ","%20")

"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
  #7   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP: email file path as a hyperlink in outlook body

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
.

  #8   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default email file path as a hyperlink in outlook body

Thanks for helping ron,

I have spaced in between so i am not able to show the entire thing as a link,

the path is somewhat like:

C:\My Documents\

there is a space between "My" and "documents"

File name is:

Me.filename.value

There is a space between in file name as well, eg, "123 abc"



"Ron de Bruin" wrote:

Try

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


--

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


"sam" wrote in message ...
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

.

  #9   Report Post  
Posted to microsoft.public.excel.programming
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
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default HELP: email file path as a hyperlink in outlook body

Email format? Is it RTF, HTML, or plain text?

Instead of the Body Property, how about the HTMLBody Property?

..HTMLBody = "<p<a href=" & Chr(34) & "C:\My Documents\" &
Me.FileName.Value & Chr(34) & "My File</a</p"

--JP


On Nov 2, 12:29*pm, 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


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
Send a Sheet as body of Outlook Email David Ackerman on cape cod Excel Discussion (Misc queries) 0 March 19th 10 03:11 PM
Hyperlink in body of VBA email Chadersmith Excel Discussion (Misc queries) 1 September 17th 09 07:46 PM
Hyperlink in Email Body Darrell Lankford Excel Programming 6 January 28th 09 07:05 PM
Outlook email url in body kevinho[_3_] Excel Programming 2 August 26th 05 12:48 PM
Late Binding to Outlook from Excel: Outlook modifies email body Lenny Wintfeld Excel Programming 0 December 12th 04 04:03 PM


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

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

About Us

"It's about Microsoft Excel"