Capture Inbound E-mail Subject with VBA
On Thu, 3 Sep 2009 05:21:01 -0700, Brad
wrote:
Michael,
Sorry, I didn’t explain very clearly what I am trying to do.
I have set up a little VBA module that is initiated by Outlook each time a
new e-mail arrives. It simply displays a message that control was passed to
it. This works nicely
I am now trying to capture the subject line of each e-mail and do something
with it in the VBA code.
Try this:
Sub IncomingMailHandler(ThisMail as MailItem)
MsgBox ThisMail.Subject
End Sub
To "install" the script, create a new "run script" rule for incoming
messages in Tools / Rules and Alerts (if that isn't how you already did
it).
|