![]() |
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
|
|||
|
|||
![]()
Hi
I need to execute a script when a message is received by a specific sender and/or a specific subject and/or it contains some string in the message text Can I do that with vba? Otherwise (even better) can I automatically create a txt subject_sender.txt in a specific directory with the content of the e- mail ? thanks and regards Nicola Attico |
Ads |
#2
|
|||
|
|||
![]()
Consider writing a VBA procedure for use with a "run a script" rule action. Such a procedure has the incoming 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 strID = MyMail.EntryID Set olNS = Application.GetNamespace("MAPI") Set msg = olNS.GetItemFromID(strID) ' do stuff with msg, e.g. MsgBox msg.SUbject Set msg = Nothing Set olNS = Nothing End Sub To create a message using external file content, see http://www.slipstick.com/mail1/html.htm -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ps.com... Hi I need to execute a script when a message is received by a specific sender and/or a specific subject and/or it contains some string in the message text Can I do that with vba? Otherwise (even better) can I automatically create a txt subject_sender.txt in a specific directory with the content of the e- mail ? thanks and regards Nicola Attico |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reception des message dans supprimer ?? | FRANVOY | Outlook Express | 1 | February 16th 07 04:11 PM |
non reception de messages | marie-france latty | Outlook Express | 1 | October 16th 06 09:09 AM |
"Action canceled" message when clicking on a link in HTML email | [email protected] | Outlook - General Queries | 0 | August 9th 06 07:27 PM |
new account = no reception | maples | Outlook Express | 2 | March 3rd 06 01:31 AM |
server-requested client action message | MCSA-M | Outlook - General Queries | 7 | January 18th 06 08:24 PM |