![]() |
SendMail to multiple recipients, one variable, and one constant
I'm trying to use the SendMail command to send a workbook to two
people, one manager, and one employee, the employee is variable, but the manager is constant, here's what i have right now ActiveWorkbook.SendMail Recipients:=Array(myRecipient , ") Subject:=("Assignments for " & myJob) that current line is looking for an end of statement, so i'm sure i've formatted something wrong, but everything i try will send the email to myRecipient, but not , any ideas? |
SendMail to multiple recipients, one variable, and one constant
Craig i have this that i use, it creates an input box so you can typ the recipient, your welcome to use or modify it! Sub Mail_SheetsArray() Dim wb As Workbook Dim strdate As String Dim I2 As Integer strdate = Format(Now, "dd-mm-yy hh-mm-ss") Application.ScreenUpdating = False ActiveWindow.SelectedSheets.Copy Set wb = ActiveWorkbook For I2 = 1 To 1 '[I have 1 to1 here so the box oly pops up once bu you could change the end figure to suit] t1 = InputBox("Enter E-mail Address", "Who To Send To?", "") With wb .SaveAs "ANYTHING" & ThisWorkbook.Name _ & " " & strdate & ".xls" .SendMail t1 ', "This is the Subject line" .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With Next Application.ScreenUpdating = True End Su -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=54376 |
SendMail to multiple recipients, one variable, and one constant
This is working for me with the address in A1
Dim myRecipient As String myRecipient = Sheets("Sheet1").Range("A1").Value ActiveWorkbook.SendMail Recipients:=Array(myRecipient, "), Subject:=("Assignments for ") -- Regards Ron de Bruin http://www.rondebruin.nl "Craig" wrote in message oups.com... I'm trying to use the SendMail command to send a workbook to two people, one manager, and one employee, the employee is variable, but the manager is constant, here's what i have right now ActiveWorkbook.SendMail Recipients:=Array(myRecipient , ") Subject:=("Assignments for " & myJob) that current line is looking for an end of statement, so i'm sure i've formatted something wrong, but everything i try will send the email to myRecipient, but not , any ideas? |
All times are GMT +1. The time now is 12:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com