Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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?



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
Mutiple names in ActiveWorkbook.SendMail Recipients:= daleatshel Excel Discussion (Misc queries) 2 February 5th 07 08:06 PM
Multiple SendMail Recipients John Hutcins Excel Programming 2 September 21st 05 02:41 PM
Error with Multiple Recipients on .SendMail Chaplain Doug Excel Programming 2 December 27th 04 06:49 PM
Multiple Recipients in SendMail Method. HELP!!! John Baker Excel Programming 2 February 1st 04 01:40 AM
Use a variable with Sendmail ? Ron de Bruin Excel Programming 1 July 31st 03 11:55 PM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"