Hi!
I am currently working in an environment which is using Exchange
Server and relies heavily on email messages, consequently everyone
sends and receives masses of mail.
Unfortunately, as it is a charity, it is screwed down so tightly
against viruses and hackers that we are prevented from loading
programs or addins.
However, it is possible to write code.
I would like to relieve the pressure in my Boss's InBox by using code
to set up a custom rule (or similar) to move read messages to folders
stipulated by the user.
I am very new to programming Outlook and have recently started making
my way through Sue Mosher's book 'Microsoft Outlook Programming', but
it is a slow process, I haven't come up with anything yet and the
pressure is on me to come up with something.
I would very much appreciate your help and/or suggestions.
Many Thanks
Barbara (^-^)/
UK
Ken Slovak - [MVP - Outlook] - 31 Mar 2004 15:43 GMT
You could handle the ItemChange event for the Items collection of the Inbox
folder. When an item is changed you get a handle to the item and can use
that to check the UnRead property. If it's False you can then move the item
to another folder.
I don't recall any specific ItemChange code but it's very similar to ItemAdd
code. Look at the ZapHTML code sample at
http://www.outlookcode.com/d/code/zaphtml.htm#cw to see how to set up an
ItemAdd handler. You can modify that to produce an ItemChange handler.

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
> Hi!
>
[quoted text clipped - 23 lines]
>
> UK
B M - 31 Mar 2004 19:52 GMT
Thank you *so* much for your suggestion. I'll try it out.
Barbara (^-^)/
brigsoft - 31 Mar 2004 21:30 GMT
Move is the method of MailItem, Unread is its parameter.
For Each oNewItem In Folder.Items.Restrict("[Unread] = 0")
oNewItem.Move ... etc