A rule to file incoming mail in a public folder

B

bluphoto

Whenever I get an email from a client I want to be able to automatically
file a copy of it in a particular public folder. That part I have
already managed, using standard outlook rules.

The next part is a little harder. As there are several people in my
team who might receive a particular message, I want all of them to run
the same rule - ie to file the email in the appropriate public folder.
BUT there's no point in Jim filing it if Barry has already received the
same email and has filed it already, so I need some VBA to copy to
public folder IF the mail isn't already there.

That part I'm stuck with!

Note that I'm using OL2003 as user (not admin) so can't install any
third party software - hence having to make something myself in VBA. I'm
not too familiar with OL VBA, but have done a fair bit in EXCEL VBA. I
guess the same principles apply, but I don't really know my way round
the OL object model.

thanks
 
M

Michael Bauer [MVP - Outlook]

You can use the ItemAdd event of the inbox for that. Note, the event won't
be fired if Outlook doesn't run while you receive the email.

This gives you a reference to the subfolder "abc" of "Public Folders":
Set Folder = Application.Session.Folders("Public Folders").Folders("abc")

To copy an item call its Copy function and pass a ref to the target folder.

You just need to decide how to identify whether the item already exists in
the public folder. Maybe you can search for the Subject and ReceivedTime
properties. See the Items.Find function for that.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 12 Aug 2009 10:45:45 -0400 schrieb bluphoto:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top