How to program custom actions to apply to rules?

C

Casimiro

Hi, everyone I would like to know how I can program these actions. Indeed
what I want is to be able to program a rule that will send a BCC of every
sent e-mail to a specified recipient. I would prefer to have it
server-hosted, but it can be client-only.
Well, if anyone knows the answer, let's just try both, because I don't have
a lot of confidence on the server we're using...
Thanks
 
S

Sue Mosher [MVP-Outlook]

Custom actions are .dll components built with Extended MAPI and C++ or
Delphi in such a way that they can be invoked by Rules Wizard. See
http://www.slipstick.com/addins/custom.htm for code samples and commercial
actions.

If you are using Outlook 2002 or later, you can create a rule with a "run a
script" action that invokes not a "script" but a public VBA subroutine with
a MailItem or MeetingItem argument, e.g.

Public Sub MyRuleScript(ThisMessage as MailItem)
MsgBox "The subject of this message is " & ThisMessage.Subject
' other code to work with ThisMessage
End Sub

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

The sample code at http://www.outlookcode.com/d/code/autobcc.htm shows how
to add a Bcc recipient using the Application.ItemSend event in Outlook VBA.

A server-based approach would, of course, depend on the capabilities of your
mail server, about which you gave no details.
 

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