Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hyperlink in body of VBA email | Excel Discussion (Misc queries) | |||
how do you email a portion of a worksheet (range) as an insert into the body of an email? | Excel Programming | |||
Email Workseet as Body of email | Excel Programming | |||
Add hyperlink to body of email thru Excel | Excel Programming | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |