A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Custom Rule - from specific sender which contains...



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 8th 07, 07:57 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Custom Rule - from specific sender which contains...

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  
Old March 12th 07, 05:54 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Custom Rule - from specific sender which contains...


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  
Old March 12th 07, 05:22 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Custom Rule - from specific sender which contains...

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.

  #4  
Old March 12th 07, 08:39 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Custom Rule - from specific sender which contains...


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.

  #5  
Old March 15th 07, 01:29 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Custom Rule - from specific sender which contains...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 07:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.