Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hyperlink in Email Body


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hyperlink in Email Body

On Jan 22, 10:22*am, "Ron de Bruin" wrote:
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 Bruinhttp://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 anemailto let an admin know that the file is
ready to be entered in a separate data base. Everything is working
except thehyperlinkin theemail. It puts the text path and name of
the file in the body of theemail, but as text and not as ahyperlink.
If anyone can help with how I can turn the text into ahyperlink, 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 THEHYPERLINK…
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



I tried changing the .body line several different ways, and I get the
link in the body of the email, but still as text only.

I tried putting the hyperlink on the excel sheet in the range that
puts the email in the HTML format, and the link goes with it, looks
like a hyperlink, but I get a box titled "Locate Link Browser". Not
sure what to try next.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hyperlink in Email Body

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"

Use .HTMLBody = strbody then instead of .Body = strbody



--

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


"Darrell Lankford" wrote in message
...
On Jan 22, 10:22 am, "Ron de Bruin" wrote:
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 Bruinhttp://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 anemailto let an admin know that the file is
ready to be entered in a separate data base. Everything is working
except thehyperlinkin theemail. It puts the text path and name of
the file in the body of theemail, but as text and not as ahyperlink.
If anyone can help with how I can turn the text into ahyperlink, 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 THEHYPERLINK…
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



I tried changing the .body line several different ways, and I get the
link in the body of the email, but still as text only.

I tried putting the hyperlink on the excel sheet in the range that
puts the email in the HTML format, and the link goes with it, looks
like a hyperlink, but I get a box titled "Locate Link Browser". Not
sure what to try next.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hyperlink in Email Body

On Jan 26, 12:50*pm, "Ron de Bruin" wrote:
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"

Use .HTMLBody = strbody then instead of .Body = strbody

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Darrell Lankford" wrote in message

...
On Jan 22, 10:22 am, "Ron de Bruin" wrote:





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 Bruinhttp://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 anemailto let an admin know that the file is
ready to be entered in a separate data base. Everything is working
except thehyperlinkin theemail. It puts the text path and name of
the file in the body of theemail, but as text and not as ahyperlink.
If anyone can help with how I can turn the text into ahyperlink, 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 THEHYPERLINK…
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


I tried changing the .body line several different ways, and I get the
link in the body of theemail, but still as text only.

I tried putting thehyperlinkon the excel sheet in the range that
puts theemailin the HTML format, and the link goes with it, looks
like ahyperlink, but I get a box titled "Locate Link Browser". Not
sure what to try next.- Hide quoted text -

- Show quoted text -


Ron,

I really appreciate the help on this and I almost have it. It works
fine, but I have a changing link to the file I need to put into where
you have
the HREF "http://www.rondebruin.nl/". I'm trying to put the
following:

Link = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

If I put the actual link "K:\Pricing\Estimates\Item 123-11-001.xls",
it works fine, but I'm not sure how to get the changing link in?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hyperlink in Email Body

Try this

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=" & ThisWorkbook.FullName & "Ron's Excel File</A" & _
"<br<br<BThank you</B"

--

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


"Darrell Lankford" wrote in message ...
On Jan 26, 12:50 pm, "Ron de Bruin" wrote:
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"

Use .HTMLBody = strbody then instead of .Body = strbody

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Darrell Lankford" wrote in message

...
On Jan 22, 10:22 am, "Ron de Bruin" wrote:





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 Bruinhttp://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 anemailto let an admin know that the file is
ready to be entered in a separate data base. Everything is working
except thehyperlinkin theemail. It puts the text path and name of
the file in the body of theemail, but as text and not as ahyperlink.
If anyone can help with how I can turn the text into ahyperlink, 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 THEHYPERLINK…
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


I tried changing the .body line several different ways, and I get the
link in the body of theemail, but still as text only.

I tried putting thehyperlinkon the excel sheet in the range that
puts theemailin the HTML format, and the link goes with it, looks
like ahyperlink, but I get a box titled "Locate Link Browser". Not
sure what to try next.- Hide quoted text -

- Show quoted text -


Ron,

I really appreciate the help on this and I almost have it. It works
fine, but I have a changing link to the file I need to put into where
you have
the HREF "http://www.rondebruin.nl/". I'm trying to put the
following:

Link = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

If I put the actual link "K:\Pricing\Estimates\Item 123-11-001.xls",
it works fine, but I'm not sure how to get the changing link in?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hyperlink in Email Body

On Jan 27, 11:09*am, "Ron de Bruin" wrote:
Try this

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=" & ThisWorkbook.FullName & "Ron's Excel File</A" & _
* * * * * * * "<br<br<BThank you</B"

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Darrell Lankford" wrote in ...

On Jan 26, 12:50 pm, "Ron de Bruin" wrote:





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"


Use .HTMLBody = strbody then instead of .Body= strbody


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Darrell Lankford" wrote in message


....
On Jan 22, 10:22 am, "Ron de Bruin" wrote:


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 htmlbody


--


Regards Ron de Bruinhttp://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 anemailto let an admin know that the file is
ready to be entered in a separate data base. Everything is working
except thehyperlinkin theemail. It puts the text path and name of
the file in thebodyof theemail, but as text and not as ahyperlink.
If anyone can help with how I can turn the text into ahyperlink, 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 THEHYPERLINK…
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


I tried changing the .bodyline several different ways, and I get the
link in thebodyof theemail, but still as text only.


I tried putting thehyperlinkon the excel sheet in the range that
puts theemailin the HTML format, and the link goes with it, looks
like ahyperlink, but I get a box titled "Locate Link Browser". Not
sure what to try next.- Hide quoted text -


- Show quoted text -


Ron,

I really appreciate the help on this and I almost have it. It works
fine, but I have a changing link to the file I need to put into where
you have
*the HREF "http://www.rondebruin.nl/". I'm trying to put the
following:

Link = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

If I put the actual link "K:\Pricing\Estimates\Item 123-11-001.xls",
it works fine, but I'm not sure how to get the changing link in?- Hide quoted text -

- Show quoted text -


I tried several times & couldn't get the hyperlink to work. It was
cutting off the end of the hyperlink at the spcaes. I went back to
your HTML function I got from you a year or so ago...
Public Function RangetoHTML(sh As Worksheet, rng As Range)

I put the following in the code after I named a cell "Path"...
Range("Path").Value = ThisWorkbook.FullName

In the range that goes into the email, I put a line with a formula...
=HYPERLINK(Path)

This puts the hyperlink in the email with the other text in the range.

Ron, thanks for taking time to help.
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
Hyperlink in body of VBA email Chadersmith Excel Discussion (Misc queries) 1 September 17th 09 07:46 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
Email Workseet as Body of email [email protected] Excel Programming 11 December 22nd 05 09:43 PM
Add hyperlink to body of email thru Excel MAYDAY[_5_] Excel Programming 3 July 7th 05 09:03 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 07:50 AM.

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"