Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to send email via outlook

Status
Not open for further replies.

LGMan

MIS
Aug 27, 2003
233
GB
Hi, I've had a simple piece of code running for a while that sends the excel workbook as an attachment to a static email address.
The receipent address is likely to become varaible. I'll be able to pull the mail address from a helper file so that's not a problem.
My problem is when trying to use a variable in the code.
Code:
Dim WhoTo As String
WhoTo = Range("F8").Value
ActiveWorkbook.SendMail _
Recipients:= "& WhoTo", _
Subject:="Blah blah "

My problem is the Recipients. I'm struggling with the correct way to use the WhoTo part.
All help or pointers gratefully accepted
 
I'd try this:
Recipients:= WhoTo, _

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
If Recipients contains more than a single recipient then you need to make it into an array. Zathras resolved that for me in one of my earliest posts to Tek-Tips thread707-495489

Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top