Using VB, specific cell data into email subject

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using VB is it possible to use specific cell data and import this into the
subject field of an email

Can easliy create code to email the excel document succesfully, but need to
grab certain information from specific cells and put this into the subject
line
using office 2003
 
I've never worked with the Outlook object model, but
after scanning some of Ron de Bruin's code at:

http://www.rondebruin.nl/sendmail.htm

wouldn't you use something like:

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

With OutMail
.Subject = Cells(1,1).Value 'Value in A1
End With
 
Back
Top