help determining vba algorithm

P

pantagruel

Hi
I have a problem at work I thought would be nice to solve with a vba
macro, unfortunately I'm not too familiar with Outlook's object model
and so forth so I'm wondering what is the proper way to solve this
problem, the problem is as follows:

we have particular rules about archiving emails, these rules require
that we print them out in order with the last email on a subject
received printed first, only emails that I have acted on are required
to be archived - essentially meaning emails I have replied to.
Another thing is if an email has all the content of an earlier email in
it, then the earlier email does not need to be printed out.
It would be nice to print out a header page for each group of emails.

So what would be nice to do is to
1. cross check sent with selected mails in selected mailbox (don't know
how to cross check with sent)

2. if there is a sent reply to an email, print out the sent email.
3. If the email in the selected mailbox is in reply to a sent email
print out both, unless the sent email has already been done.

Now if I were not to handle this in VBA I would probably just dump all
files to the filesystem as text messages where I could do comparison
against them. Seems wasteful and too much like seeing nails for my
hammer.

The way I would figure to handle this in vba includes reading all
subjects into arrays first and then using these arrays to determine
which emails were related, and printing these out in the required
order. I am not sure how reasonable that approach is however,
suggestions?

Also of course if anyone has any code that does most of this already I
would appreciate it, thanks.
 
Top