![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]() 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 -- bluphoto http://forums.slipstick.com/ |
#2
|
|||
|
|||
![]() 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: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I copy incoming messages to a msg file using a rule? | Tony | Outlook and VBA | 0 | July 3rd 09 01:38 PM |
Using a rule to have an incoming mail message setup a calendar eve | Justin H | Outlook - Calandaring | 2 | January 22nd 09 01:33 AM |
Moving public contacts e-mail to public journal with rule | mbn | Outlook - Using Contacts | 2 | May 18th 07 06:59 PM |
activate contact folder from public folder with "show this folder as email address book using a prf file | Frankie K. | Outlook - Using Contacts | 7 | July 25th 06 06:37 PM |
Rule to Forward Incoming Mail Fails when item is itself a replied-to or forwarded e-mail | Steven Bookman | Outlook - General Queries | 3 | April 6th 06 10:41 PM |