View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 141
Default Code to add today's date in subject line VBA

I found a nice bit of code for sending an email to a list
from within Excel. I am hoping that somebody can provide
me with a bit more code to insert today's date
in the subject line below.. so it would read "PET
Allshort and Missort Report TODAY'S DATE"

Thanks, Steve -

Sub E_Mail()
'sends the activeworkbook to the e-mail address in a
range named "list" in Sheet 'a sheet named E-Mail
Dim MyArr As Variant
MyArr = Sheets("Sheet1").Range("list")
'Will send with the subject send email.xls
'ActiveWorkbook.SendMail MyArr
ActiveWorkbook.SendMail Recipients:=MyArr, _
Subject:="PET AllShort and Missort Report"
'Resets "look in" to my documents
'ChDir "C:\My Documents"
End Sub