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 - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Create rule to run script



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 23rd 06, 05:34 PM posted to microsoft.public.outlook
Dave
external usenet poster
 
Posts: 2
Default Create rule to run script

I have a vb script that when run takes the attachment on an e-mail and
places it in a folder. Is there any way to setup a rule in outlook that
when an e-mail is received from a certain person or address, to
automatically run this script to place the attachment in the specified
folder?

Thanks in advance


Ads
  #2  
Old August 23rd 06, 06:05 PM posted to microsoft.public.outlook
Diane Poremsky [MVP]
external usenet poster
 
Posts: 12,991
Default Create rule to run script

what version?

--
Diane Poremsky [MVP - Outlook]
Author, Teach Yourself Outlook 2003 in 24 Hours
Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide)
Need Help with Common Tasks? http://www.outlook-tips.net/beginner/
Outlook 2007: http://www.slipstick.com/outlook/ol2007/

Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com
Subscribe to Exchange Messaging Outlook newsletter:



"Dave" wrote in message
...
I have a vb script that when run takes the attachment on an e-mail and
places it in a folder. Is there any way to setup a rule in outlook that
when an e-mail is received from a certain person or address, to
automatically run this script to place the attachment in the specified
folder?

Thanks in advance



  #3  
Old August 23rd 06, 07:14 PM posted to microsoft.public.outlook
Dave
external usenet poster
 
Posts: 2
Default Create rule to run script

Outlook 2003

"Diane Poremsky [MVP]" wrote in message
...
what version?

--
Diane Poremsky [MVP - Outlook]
Author, Teach Yourself Outlook 2003 in 24 Hours
Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide)
Need Help with Common Tasks? http://www.outlook-tips.net/beginner/
Outlook 2007: http://www.slipstick.com/outlook/ol2007/

Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com
Subscribe to Exchange Messaging Outlook newsletter:



"Dave" wrote in message
...
I have a vb script that when run takes the attachment on an e-mail and
places it in a folder. Is there any way to setup a rule in outlook that
when an e-mail is received from a certain person or address, to
automatically run this script to place the attachment in the specified
folder?

Thanks in advance





  #4  
Old August 23rd 06, 07:41 PM posted to microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Create rule to run script

A "run a script" rule action actually 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

strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
' do stuff with msg, e.g.
MsgBox msg.Attachments.Count

Set msg = Nothing
Set olNS = Nothing
End Sub
--
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

"Dave" wrote in message ...
I have a vb script that when run takes the attachment on an e-mail and
places it in a folder. Is there any way to setup a rule in outlook that
when an e-mail is received from a certain person or address, to
automatically run this script to place the attachment in the specified
folder?

Thanks in advance


 




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
Create a rule using a script... ANDRES Outlook and VBA 3 August 22nd 06 06:42 PM
Rule 'run a script' not running my script [email protected] Outlook and VBA 3 May 30th 06 12:09 PM
Selective Read Receipts VBA using run a script rule prideoflions Outlook and VBA 5 May 26th 06 03:31 PM
"Run a script" rule triggers but script does not execute Trey Shaffer Outlook and VBA 7 April 7th 06 11:34 PM
Create rule by script Louis Outlook and VBA 3 March 15th 06 04:49 PM


All times are GMT +1. The time now is 05:03 AM.


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.