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 with .HTMLBody: Display Hpyerlink in email body

Hi All,

I want to display the file path as hyperlink in my email body, I tried using
..HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
..HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default HELP with .HTMLBody: Display Hpyerlink in email body

IIRC, you need to put something like this in your code

<a href="http:mypath"http:mypath</a

It's been a while since I did anything in html.
--
HTH,

Barb Reinhardt



"sam" wrote:

Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default HELP with .HTMLBody: Display Hpyerlink in email body

To help yousolve your problem you can open a new word document. Then paste
your hyperlink in to the word document and save a HTML. then you can open
the HTML with notepad to see the tags Bard described. You can copy the path
location from a window explorer window. Make sure the window explorere has
the address bar visible (View - Toolbars - Address Bar)

"Barb Reinhardt" wrote:

IIRC, you need to put something like this in your code

<a href="http:mypath"http:mypath</a

It's been a while since I did anything in html.
--
HTH,

Barb Reinhardt



"sam" wrote:

Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP with .HTMLBody: Display Hpyerlink in email body

Thanks Joel, I got this to work. Can you help me with pulling data from
access into userform fields using ADO? I did post my query like you asked. I
would appreciate any help.

Thanks again

"Joel" wrote:

To help yousolve your problem you can open a new word document. Then paste
your hyperlink in to the word document and save a HTML. then you can open
the HTML with notepad to see the tags Bard described. You can copy the path
location from a window explorer window. Make sure the window explorere has
the address bar visible (View - Toolbars - Address Bar)

"Barb Reinhardt" wrote:

IIRC, you need to put something like this in your code

<a href="http:mypath"http:mypath</a

It's been a while since I did anything in html.
--
HTH,

Barb Reinhardt



"sam" wrote:

Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default HELP with .HTMLBody: Display Hpyerlink in email body

See how I do it here

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"


--

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


"sam" wrote in message ...
Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP with .HTMLBody: Display Hpyerlink in email body

Thanks for helping Ron,

When i do it your way, I go get the hyperlink displayed in the email body,
BUT the link displays as "C:\My Documents\FileNumber.Value" Here the
FileNumber is a text field in the userform which have different values
everytime. SO instead of "C:\My Documents\FileNumber.Value" I want "C:\My
Documents\abc 123" ; "C:\My Documents\abc 234" ect

here, abc 123, abc 234 ... etc are actual file names the files are saved with.

Hope I made it clear.

Thanks in advance



"Ron de Bruin" wrote:

See how I do it here

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"


--

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


"sam" wrote in message ...
Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.

.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default HELP with .HTMLBody: Display Hpyerlink in email body

Ok, I test it with a file name in A1
and for every space in my path I add %20


I use

LinktoFile = "C:\Users\Ron%20Desktop\Desktop\Mee%20Bezig\" & Range("A1").Value


And use it it like this

"<A HREF=" & LinktoFile & "Ron 's Excel Page</A" & _


--

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


"sam" wrote in message ...
Thanks for helping Ron,

When i do it your way, I go get the hyperlink displayed in the email body,
BUT the link displays as "C:\My Documents\FileNumber.Value" Here the
FileNumber is a text field in the userform which have different values
everytime. SO instead of "C:\My Documents\FileNumber.Value" I want "C:\My
Documents\abc 123" ; "C:\My Documents\abc 234" ect

here, abc 123, abc 234 ... etc are actual file names the files are saved with.

Hope I made it clear.

Thanks in advance



"Ron de Bruin" wrote:

See how I do it here

strbody = "<H3<BDear Customer</B</H3" & _
"Please visit this website to download the new version.<br" & _
"Let me know if you have problems.<br" & _
"<A HREF=""http://www.rondebruin.nl/""Ron's Excel Page</A" & _
"<br<br<BThank you</B"


--

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


"sam" wrote in message ...
Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.


Thanks in advance.

.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default HELP with .HTMLBody: Display Hpyerlink in email body

I have a few approaches listed he

http://www.codeforexcelandoutlook.co...outlook-email/

For example, strDirectory is a variable with the folder name, strFName
is the filename, and strDisplay is the text to be displayed as the
hyperlink.

"<p<a href=" & Chr(34) & strDirectory & "\" & _
strFName & ".xls" & Chr(34) & "" & strDisplay & _
" </a</p"

--JP

On Nov 12, 1:05*pm, sam wrote:
Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
* * * * * * * * *" Name: " & Me.Name.Value & "<br" & _
* * * * * * * * *"Email: " & Me.Email.Value & "<br" & _
* * * * * * * * *"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
* * * * * * * * *"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.

Thanks in advance.


  #9   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP with .HTMLBody: Display Hpyerlink in email body

Thanks JP, this worked out great!

"JP" wrote:

I have a few approaches listed he

http://www.codeforexcelandoutlook.co...outlook-email/

For example, strDirectory is a variable with the folder name, strFName
is the filename, and strDisplay is the text to be displayed as the
hyperlink.

"<p<a href=" & Chr(34) & strDirectory & "\" & _
strFName & ".xls" & Chr(34) & "" & strDisplay & _
" </a</p"

--JP

On Nov 12, 1:05 pm, sam wrote:
Hi All,

I want to display the file path as hyperlink in my email body, I tried using
.HTMLBody and usging "%20" where theres a space but then when i send the
email i see a "%20" in my email body. Here is what i have for outlook
.HTMLBody

strbody = "<H3<BInformation: </B</H3 <br" & _
" Name: " & Me.Name.Value & "<br" & _
"Email: " & Me.Email.Value & "<br" & _
"Date: " & Me.DatePreparedTextBox.Value & "<br" & _
"LP Path: " & "C:\My Documents\" & Me.FileNumber.Value &
"<br" & "<br" & _

ALSO, I am saving the file with a field name from the form(thats why
Me.FileNumber.value is the part of the path as the file is saved with this
name).
And that field name too has a space in between.
Such as "ABC 123"

SO the patch would look like: "C:\My Documents\ABC 123"
and I want to display this as a hyperlink, so the user can just click on the
link and open up the file.

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
Display file path as hyper link in outlook email body sam Excel Programming 1 November 9th 09 08:33 PM
using vbCrLf in email body does not work with HTMLBody Tom Joseph Excel Programming 2 May 4th 09 03:24 PM
how do you email a portion of a worksheet (range) as an insert into the body of an email? Bruce[_2_] Excel Programming 3 May 31st 07 10:37 PM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM


All times are GMT +1. The time now is 11:49 PM.

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"