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 Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel cell to subject line in email

Status
Not open for further replies.

kdoran

Technical User
Mar 23, 2003
88
US
I need to have a cell populate the subject line in an email. Here is what i am currently using to email the spreadsheet via button.

-------------------------

Private Sub CommandButton2_Click()

ActiveWorkbook.SendMail Recipients:="name@company.com"

'each individual file should be save to a dir and subfolder, change location here below

ActiveWorkbook.SaveAs "\\cpwau01\stmplt_com\Outside Inst\AnnualOutsideClusterRules\" & Format(Date, "mm.dd.yyyy.") & Format(Time, "hh.mm.ss") & ".xls"

End Sub

------------------------------------


This currently emails the xls as an attachment and names the subject line to whatever the filename is. I need to be able to put in a workorder number in a cell and have it used as the subject line. If it needs to be a text box, that is fine as well.

On a seperate note, what does it take to set up the file as the body of the email?

Thanks in advance,
 





Hi,

Please post VBA code questions in Forum707

Skip,
[sub]
[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top