Checking attachments as they arrive

  • Thread starter Thread starter ben
  • Start date Start date
B

ben

Every time one (or more) e-mails arrive I need to be able to check the name
of an attachment and if it contains certain words, we'll just use example
as the word for this, I want to mark it as read and move it to a folder. I
can use either a rule or vba. The problem I'm having with the rule is that I
don't see one that will read the attachment name as new mail arrives. With
vba the only possible way I can see to check attachments is to loop through
each and every e-mail in the Inbox instead of just unread mail. This isn't
quite possible as the user I am creating this for has about 65,000 e-mails in
his inbox over 7 years and would be quite adverse to changing his system. I
can fire the newmail or newmailex event, but I can't find a way to filter
attachments from only Unread mail. Any suggestions? I could probably even use
a .find .findnext loop but can't locate the syntax for unread mail.
 
Anyway, so after a couple more hours of searching I discovered the simple
fact that I can set outlook to run a script from a rule, so now I just have
it running my attachment checking script on each new e-mail as it arrives.
 
Back
Top