How to scan Outlook 2003 inbox for incoming mail based on subjectline

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi all,

I came across a link awhile back, but couldn't find it now. What I am
trying to do is to scan outlook 2003 inbox for an email everyday. This
email comes in everyday from a vendor, with specific subject line and it
could come from different individual from the vendor, but obviously it
has the same "@CompanyABC.com"

Is there a way to scan for the email using vba?

Thanks,

Ben
 
Michael,

Do you have any links to any article or KB. My google search didn't
come up much. I cannot use the rule wizard, because the email comes
with a dated attachment, and the file is saved to a directory of a dated
structure, that is ...\year\month\day\..

And there are multiple emails coming in from multiple vendors. Thanks
in advance for sharing your thoughts.

Ben
 
Ben said:
I cannot use the rule wizard, because the email comes
with a dated attachment, and the file is saved to a directory of a dated
structure, that is ...\year\month\day\..

Saved by WHAT? You imply but don't mention that something, like an add-on,
is stripping or copying attachments from your e-mails and saving them into
some directory in your file system on your hard disk. Okay, but what does
that have to do with the organization of e-mails within the message store in
Outlook itself?
And there are multiple emails coming in from multiple vendors. Thanks
in advance for sharing your thoughts.

Just what is the VBA macro going to use as criteria to detect a particular
e-mail that the rules cannot already use? You said the criteria was:

- with specific subject line
- always comes from someone at "@CompanyABC.com"

So why can't you create a rule that tests on that same criteria? You also
said:

- scan outlook 2003 inbox for an email

However, you neglected to mention what you want to *do* with those matching
e-mails. Move them into a special folder (in Outlook's message store),
delete them, mark them as read, auto-reply to them, or WHAT? Based on what
you said so far, the rule might look like:

Apply rules after the message arrives
with "@companyabc.com" in the sender's address
and with <yourUndentifiedString> in the subject
<someUnidentifiedAction>
and stop processing more rules

If all you want to do is *find* these e-mails (and not move, delete, or
otherwise process them with an action in a rule), why not use a search
folder in Outlook? I'm not expert in creating search folders (rarely use
them myself) but nothing you mentioned so far leads me to believe that you
cannot define criteria usable by a search folder that lists the e-mails that
you want to find.
 
The example below might be something to begin with. It shows how to save any
incoming email, it also demonstrates how to use the Format function, with
which you can retrieve the year, month and day of a given date. You just
need to add check for the domain of the sender before saving the email; for
that read the SenderEmailAddress property, and use the Instr function:

http://www.vboffice.net/sample.html?mnu=2&lang=en&smp=7&cmd=showitem

--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
<http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 23 Dec 2009 11:20:05 -0500 schrieb Ben:
 
Back
Top