PC Review


Reply
Thread Tools Rate Thread

Create rule to run script

 
 
Dave
Guest
Posts: n/a
 
      23rd Aug 2006
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


 
Reply With Quote
 
 
 
 
Diane Poremsky [MVP]
Guest
Posts: n/a
 
      23rd Aug 2006
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:
EMO-NEWSLETTER-SUBSCRIBE-(E-Mail Removed)


"Dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      23rd Aug 2006
Outlook 2003

"Diane Poremsky [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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:
> EMO-NEWSLETTER-SUBSCRIBE-(E-Mail Removed)
>
>
> "Dave" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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
>>

>
>



 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      23rd Aug 2006
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a rule using a script... =?Utf-8?B?QW5kcmVz?= Microsoft Outlook VBA Programming 3 22nd Aug 2006 06:42 PM
Rule 'run a script' not running my script s.parsley@ntlworld.com Microsoft Outlook VBA Programming 3 30th May 2006 12:09 PM
Create rule by script =?Utf-8?B?TG91aXM=?= Microsoft Outlook VBA Programming 3 15th Mar 2006 04:49 PM
Outlook 'create rule' should allow rule for no sender or subject =?Utf-8?B?R3JlZyBN?= Microsoft Outlook Discussion 2 29th Jul 2005 08:11 PM
Create folders and rule with Script or execute file ?? =?Utf-8?B?Sm9oYW4=?= Microsoft Outlook VBA Programming 5 17th Mar 2005 08:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:39 AM.