Solved: Copy EXCEL Cell To E-Mail Subject
Hi,
I am trying to copy a cell from an excel file I attached and paste it into the subject of the e-mail.
For example, right now the macro below makes the subject "Date - ", where I want it to be "Date - 10/08/2008". Where 10/08/2008 comes from the attached file: "C:\File.xls", sheet "Sheet1", cell A1.
How do I do this?
This is the code I have so far.
Thanks.
I am using Excel / Outlook 2003.
[vba]
Sub Send_File()
Dim msg As Outlook.MailItem
Set msg = Application.CreateItem(olMailItem)
msg.Subject = "Date - "
msg.To = JoeSchmoe@aol.com
msg.CC = JaneDoe@gmail.com
msg.Body = "This is the message body."
msg.Attachments.Add "C:\File.xls"
msg.Display
End Sub
[/vba]