• Subject: Re: looping through inbox messages / debugger under Outlook VBA
  • Author: Mark VII
  • Date: 10 Apr 2008
  • References: 1 2
Hi Sue --

Points well taken. What I did is driven partly by our processing
requirments, and partly due to my inexperience with programming Outlook. (I
can make Access and Excel sing and dance, but this is my first attempt at
automated processing of incoming email.) Here's a capsule on our situation
and my thought process, and am open wide to feedback. I've got a question
for you at the end.

We have some software that creates very large log files as it runs, but no
built in tools to analyze the logs. We have an Access database that parses
the log files, and loads some tables so we can query this data. Currently,
we save these log files by hand. Because our software sends out an automated
email with the log file text in the body, I want to automatically save the
body of these emails as a plain text file and move the emails to a desingated
folder.

Based on the research I've done so far, if a lot of emails arrive in a short
period of time, a rule that triggers a script may not always fire.
Similarly, I've read that the ItemAdd event and the NewMail events don't
always fire. Consequently, I thought it prudent to walk the whole inbox, so
we don't miss any files.

This leads to a question about your suggestion -- if I create a standard VBA
program, what is the best way to trigger it when a new email shows up?
Should I just write the program to run in a loop, looking for emails that
meet its selection criteria? (These log files come from a specific email
address and have specific text in the subject line.) This needs to run on a
user's PC (particulary mine), so what I do can't tie up the machine.

Thanks a million,
Mark
09 Apr 2008looping through inbox messages / debugger under Outlook VBA.Mark VII
09 Apr 2008|- Re: looping through inbox messages / debugger under Outlook VBA.Ken Slovak - [MVP - O...
09 Apr 2008|  \ Re: looping through inbox messages / debugger under Outlook VBA.Mark VII
10 Apr 2008|     \ Re: looping through inbox messages / debugger under Outlook VBA.Ken Slovak - [MVP - O...
09 Apr 2008\ Re: looping through inbox messages / debugger under Outlook VBA.Sue Mosher [MVP-Outlook]
10 Apr 2008   \ Re: looping through inbox messages / debugger under Outlook VBA.Mark VII
10 Apr 2008      \ Re: looping through inbox messages / debugger under Outlook VBA.Sue Mosher [MVP-Outlook]
10 Apr 2008         \ Re: looping through inbox messages / debugger under Outlook VBA.Mark VII
All times are in (US) Eastern Daylight Time (GMT -4:00)