ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sendmail recipient (https://www.excelbanter.com/excel-programming/418480-sendmail-recipient.html)

Atishoo

sendmail recipient
 
does anyone know how to get the email function to email a recipient whos
address is in a cell (D21) ?
eg-- how do i get this to work:-

With Dest
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
On Error Resume Next
.SendMail Sheets("Options").Range("D21").Value, "EPB"
On Error GoTo 0
.Close SaveChanges:=False
End With

Ron de Bruin

sendmail recipient
 
Looks good

Are you sure that the activeworkbook on this moment have a sheet named "Options"

If not you can point to the workbook with the code like this

..SendMail ThisWorkbook.Sheets("Options").Range("D21").Value, _
"This is the Subject line"


--

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


"Atishoo" wrote in message ...
does anyone know how to get the email function to email a recipient whos
address is in a cell (D21) ?
eg-- how do i get this to work:-

With Dest
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
On Error Resume Next
.SendMail Sheets("Options").Range("D21").Value, "EPB"
On Error GoTo 0
.Close SaveChanges:=False
End With



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com