![]() |
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
|
|||
|
|||
![]()
Please advise how I can use "Rules" to copy incoming email into a folder with
the same reference. This would have to recognise a code "EN####" where the hash is a number. ie EN1234, EN1235 En1236 etc Assume the folders are already created! |
#2
|
|||
|
|||
![]()
Rules aren't smart enough to do wildcard matching on message contents. You'd
have to write a VBA macro and wire it up so that it fires from other criteria: How to create a script for the Rules Wizard in Outlook: http://support.microsoft.com/default...;en-us;q306108 If all of the message data is completely dynamic and a rule can't be created that satisfies some basic criteria, you'd have to code everything and bypass rules altogether: How to create a custom rule in Outlook 2000 by using Visual Basic for Applications: http://support.microsoft.com/?kbid=235852 -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Mark - outlook" wrote: Please advise how I can use "Rules" to copy incoming email into a folder with the same reference. This would have to recognise a code "EN####" where the hash is a number. ie EN1234, EN1235 En1236 etc Assume the folders are already created! |
#3
|
|||
|
|||
![]()
This sounds like a good project for a "run a script" rule action, which uses not an external script but a VBA procedure with a MailItem or MeetingItem as its parameter. That item is processed by the code:
Sub RunAScriptRuleRoutine(MyMail As MailItem) Dim strID As String Dim olNS As Outlook.NameSpace Dim msg As Outlook.MailItem Dim rply as Outlook.MailItem strID = MyMail.EntryID Set olNS = Application.GetNamespace("MAPI") Set msg = olNS.GetItemFromID(strID) ' do stuff with msg, e.g. Set rply = msg.Reply rply.Body = "What you want the reply to say." rply.To = ; " rply.Send Set msg = Nothing Set rply = Nothing Set olNS = Nothing End Sub For Outlook VBA basics, see http://outlookcode.com/article.aspx?id=49 You can use the Instr() and Mid() functions for basic string parsing, if you don't want to dive into regular expressions. To get a non-default folder, you need to walk the folder hierarchy using the Folders collections or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Mark - outlook" wrote in message ... Please advise how I can use "Rules" to copy incoming email into a folder with the same reference. This would have to recognise a code "EN####" where the hash is a number. ie EN1234, EN1235 En1236 etc Assume the folders are already created! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Some Incoming Email Messages have "clear" text....... | Incoming Emails with Clear Color text | Outlook Express | 6 | May 22nd 07 06:52 PM |
change incoming email attachment default to "open" vs "save as" | conroy | Outlook - General Queries | 1 | December 12th 06 01:58 AM |
Assigning "Normal" Importance to incoming email | [email protected] | Outlook - General Queries | 0 | May 3rd 06 07:20 PM |
Assigning "Normal" Importance to incoming email | [email protected] | Outlook and VBA | 0 | May 3rd 06 07:20 PM |
Assigning "Normal" Importance to incoming email | [email protected] | Outlook - General Queries | 0 | May 3rd 06 07:20 PM |