![]() |
Add hyperlink to body of email thru Excel
Hi, I have a macro that saves an excel file and sends it to variou recipients. How would I add a hyperlink to the body of the emai instead of the actual file itself? ActiveWorkbook.SendMail Recipients:=Array("Body, Ann E"), _ Subject:="Test Hyperlink" Thanks in advance -- MAYDA ----------------------------------------------------------------------- MAYDAY's Profile: http://www.excelforum.com/member.php...fo&userid=1354 View this thread: http://www.excelforum.com/showthread.php?threadid=38524 |
Add hyperlink to body of email thru Excel
Try something like:
With usrAPinvoices If usrAPinvoices.optEmailRpts = True Then Application.DisplayAlerts = False 'mailing routine Workbooks(ExpFileName).Activate mMsg = "This Invoice file created on " & Application.Text(Now(), "dd mmm yyyy HH:mm") _ & ". http://xl.barasch.com" If ActiveWorkbook.HasRoutingSlip = False Then ActiveWorkbook.HasRoutingSlip = True End If With ActiveWorkbook.RoutingSlip .Recipients = BranchAdmin .Subject = Branch & " AP Invoices" .Message = mMsg .Delivery = xlAllAtOnce .ReturnWhenDone = False .TrackStatus = True End With Application.DisplayAlerts = True Else 'don't mail End If End With "MAYDAY" wrote: Hi, I have a macro that saves an excel file and sends it to various recipients. How would I add a hyperlink to the body of the email instead of the actual file itself? ActiveWorkbook.SendMail Recipients:=Array("Body, Ann E"), _ Subject:="Test Hyperlink" Thanks in advance. -- MAYDAY ------------------------------------------------------------------------ MAYDAY's Profile: http://www.excelforum.com/member.php...o&userid=13548 View this thread: http://www.excelforum.com/showthread...hreadid=385245 |
Add hyperlink to body of email thru Excel
Hello I hope this help you Sub CreationMailEtLienHypertexte() Dim OlApp As New Outlook.Application Dim OlItem As Outlook.MailItem Set OlItem = OlApp.CreateItem(olMailItem) With OlItem ..To = " ..Subject = "Le titre du message" ..HTMLBody = "<BODY<A href='" & ThisWorkbook.FullName & _ "'The WorkBook</A</BODY" 'adapt the link ..Display ..Save ..send End With Set OlItem = Nothing Set OlApp = Nothing End Sub Regards , michel -- michelxld ------------------------------------------------------------------------ michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367 View this thread: http://www.excelforum.com/showthread...hreadid=385245 |
Add hyperlink to body of email thru Excel
Hi
Try this if you use Outlook (see macro example on this page) http://www.rondebruin.nl/sendmail.htm Use ..Body = "file://Yourcomputer/YourFolder/Week2.xls" If there are spaces use %20 ..Body = "file://Yourcomputer/YourFolder/Week%202.xls" Example for a file on a website ..Body = "http://www.rondebruin.nl/files/EasyFilter.zip" -- Regards Ron de Bruin http://www.rondebruin.nl "MAYDAY" wrote in message ... Hi, I have a macro that saves an excel file and sends it to various recipients. How would I add a hyperlink to the body of the email instead of the actual file itself? ActiveWorkbook.SendMail Recipients:=Array("Body, Ann E"), _ Subject:="Test Hyperlink" Thanks in advance. -- MAYDAY ------------------------------------------------------------------------ MAYDAY's Profile: http://www.excelforum.com/member.php...o&userid=13548 View this thread: http://www.excelforum.com/showthread...hreadid=385245 |
All times are GMT +1. The time now is 01:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com