View Single Post
  #8  
Old May 27th 08, 06:16 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default is it possible to create a dynamic rule in outlook?

All the relevant methods are documented in Help, usually with code samples.

a) Parsing -- Basic functions like Instr(), Mid(), etc.

b) Checking for a folder -- MAPIFolder.Folders.Item("name of folder") returns Nothing if the folder doesn't exist

c) MAPIFolder.Folders.Add + MailItem.Move

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Colin" wrote in message ...
Thanks Sue,

Are there any particular code examples you can cite? I am not a programmer,
save some bash shell scripting in Linux. As long as I have the basic parts
of code in some order, I can usually pull things apart and work with them.

Regards,
Colin

"Sue Mosher [MVP-Outlook]" wrote:

Yes, that's certainly possible. It would involve a) parsing the subject property to locate the number, b) checking for the existence of the folder, c) creating the folder using the MAPIFolder.Folders.Add method, then moving the item with the Move method.

There are several examples of such a process among the code samples at http://www.outlookcode.com.

"Colin" wrote in message ...
Similar to this post, is there a way of creating a rule that creates folders
based on the subject line?

EG. An email arrives with a number attached: TT30944, the rule creates the
30944 folder and moves all mail with that number in the subject to that
folder.

Anyone here know if this is possibe?



Ads