How do you create a custom action for an MS Outlook rule?

G

geigerbj

I'm using MS Outlook 2003 and I want to creat a rule that uses a custom
action.

I am trying to run a program (.exe file) that takes a parameter (-f
filename).

When I try to create the rule and I choose custom action I just get a window
that says "Choose an action to be performed:. The drop down to select from is
empty. How do I populate this drop down with my custom action?
 
S

Sue Mosher [MVP-Outlook]

Unless you're an Extended MAPI and C++ programmer, a custom action is not something you can casually create. What are you trying to accomplish?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

geigerbj

Maybe I should become an Extended MPI and C++ programmer.

This is what I am trying to accomplish: A c-shell script emails me when it
has completed, this indicates files on a Unix box are ready to be FTP'ed to
my PC. I want to start a script that I created with my FTP program (WS_FTP
pro) and transfer the files. I thought I could use the "start application"
option but I some how need to indicate the script file to the application and
I do not see anyway of doing that.

Your thoughts?
 
S

Sue Mosher [MVP-Outlook]

IIRC, there is at least one available custom action will allow you to hook an external program with the incoming item; see http://www.slipstick.com/addins/custom.htm

If you can't get that to work, you can use a "run a script" rule action, which calls 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.SUbject

Set msg = Nothing
Set olNS = Nothing
End Sub

See http://www.outlookcode.com/d/code/zaphtml.htm#ol2002 for another example.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top