Saving Subject Text in Excel Doc

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

Guest

Hello-

Is there a way to automagically save the subject field from emails sent to a
defined email address into an excel doc? Any help would be greatly
appreciated.

Thank you,
bbkixx
 
To start, review my blog article to wire up your plumbing:

Getting a Handle on Your E-mails with VBA:
http://blogs.officezealot.com/legault/articles/2224.aspx

Once you've done that, you'll be able to hook into the objMailItem_Send
event, which is where you'll want to grab the objMailItem.Subject property
value if any of the address in the objMailItem.Recipients collection matches
what you are looking for.

Then use some other code similar to this to open an Excel file:

Dim objExcel As Object

Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open "C:\Temp\Book1.xls"

Check the Excel VBA documentation for further examples on writing to cells.
 
Back
Top