![]() |
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
|
|||
|
|||
![]()
I am looking to create a rule to move messages from my Inbox to a
specificed folder. The messages will always come from a specific sender but the recipients will contain different ones but a core group. I am looking to only move the messages which contain a particular list of (~10) people and keep all others. I know little about code but can muddle through it with some direction. THe advanced rules would work but the "Sent To:" property only contains an "OR" statement between users not an "AND" statement. Any help would be appreciated. |
Ads |
#2
|
|||
|
|||
![]() Here're the basics you need for a run-a-script rule that works without blocked properties in OL 2003: Public Sub MyRule(Item as Outlook.MailItem) Dim Mail as Outlook.MailItem With Item Set Mail=Application.Session.GetItemFromID(.EntryID, .Parent.StoreID) End With End Sub Then work with the Mail variable, and not the Item variable. You can check its SenderEMailAddress and Recipients collection. To move a message call its Move function. There's a sample it the VBA help file. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German: http://www.VBOffice.net/product.html?pub=6) Am 8 Mar 2007 11:57:08 -0800 schrieb : I am looking to create a rule to move messages from my Inbox to a specificed folder. The messages will always come from a specific sender but the recipients will contain different ones but a core group. I am looking to only move the messages which contain a particular list of (~10) people and keep all others. I know little about code but can muddle through it with some direction. THe advanced rules would work but the "Sent To:" property only contains an "OR" statement between users not an "AND" statement. Any help would be appreciated. |
#3
|
|||
|
|||
![]()
On Mar 12, 12:54 am, "Michael Bauer [MVP - Outlook]"
wrote: Here're the basics you need for a run-a-scriptrulethat works without blocked properties in OL 2003: Public Sub MyRule(Item as Outlook.MailItem) Dim Mail as Outlook.MailItem With Item Set Mail=Application.Session.GetItemFromID(.EntryID, .Parent.StoreID) End With End Sub Then work with the Mail variable, and not the Item variable. You can check its SenderEMailAddress and Recipients collection. To move a message call its Move function. There's a sample it the VBA help file. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German:http://www.VBOffice.net/product.html?pub=6) Am 8 Mar 2007 11:57:08 -0800 schrieb : I am looking to create aruleto move messages from my Inbox to a specificed folder. The messages will always come from aspecificsenderbut the recipients will contain different ones but a core group. I am looking to only move the messages which contain a particular list of (~10) people and keep all others. I know little about code but can muddle through it with some direction. THe advanced rules would work but the "Sent To:" property only contains an "OR" statement between users not an "AND" statement. Any help would be appreciated.- Hide quoted text - - Show quoted text - Forgive me but I am still stuck, can you be more explicit, i guess my programming isn't that great after all. |
#5
|
|||
|
|||
![]()
On Mar 12, 3:39 pm, "Michael Bauer [MVP - Outlook]"
wrote: I asked you to tell what the problem is. Now I have to guess. Please open the object browser (f2), switch from All Libraries to Outlook and select MailItem from the left pane. From the right one select the mentioned properties, Recipients, and SenderEMailAddress, and press f1. It opens a sample that shows how to work with the properties. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German:http://www.VBOffice.net/product.html?pub=6) Am 12 Mar 2007 10:22:36 -0700 schrieb : On Mar 12, 12:54 am, "Michael Bauer [MVP - Outlook]" wrote: Here're the basics you need for a run-a-scriptrulethat works without blocked properties in OL 2003: Public Sub MyRule(Item as Outlook.MailItem) Dim Mail as Outlook.MailItem With Item Set Mail=Application.Session.GetItemFromID(.EntryID, .Parent.StoreID) End With End Sub Then work with the Mail variable, and not the Item variable. You can check its SenderEMailAddress and Recipients collection. To move a message call its Move function. There's a sample it the VBA help file. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German:http://www.VBOffice.net/product.html?pub=6) Am 8 Mar 2007 11:57:08 -0800 schrieb : I am looking to create aruleto move messages from my Inbox to a specificed folder. The messages will always come from aspecificsenderbut the recipients will contain different ones but a core group. I am looking to only move the messages which contain a particular list of (~10) people and keep all others. I know little about code but can muddle through it with some direction. THe advanced rules would work but the "Sent To:" property only contains an "OR" statement between users not an "AND" statement. Any help would be appreciated.- Hide quoted text - - Show quoted text - Forgive me but I am still stuck, can you be more explicit, i guess my programming isn't that great after all.- Hide quoted text - - Show quoted text - The problem is I don't have the background to build this code. Care to help a guy out and provide a more complete code base? SD |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Do not receive email from a specific sender. | Bill & Debbie | Outlook Express | 5 | January 15th 07 03:49 PM |
dial phone upon receipt of email from specific sender | RHD3 | Outlook - Using Contacts | 1 | December 27th 06 04:23 PM |
How to run a rule only during specific time periods? | Alan | Outlook - General Queries | 2 | September 26th 06 07:26 PM |
rule based on sender? | sandgroper | Outlook - Installation | 3 | July 30th 06 10:03 AM |
Can i create a rule to save an attachment from a specific sender? | RatMonkey | Outlook - Installation | 1 | July 19th 06 09:39 PM |