My.OutlookMessageRuleAction

We use a server-based filter for unsolicited email that does quite good a job (yes, it’s Brightmail).

Nobody is perfect, so some messages still land in the Inbox and need a human touch. There’s a COM-AddIn for Outlook that adds a command bar to submit the junk mail where it belongs.

So far, so good.

However, the submission is itself a message with the questionable item attached and will, by default, be copied to the Sent Items folder.

Diligent as I am, I’m archiving what I’ve written to other people.

But how do I get rid of the junk in the jar?

I want to set the Expiry Date to Now and wait for the AutoArchive magic to happen. Not manually, because manually I could delete the whole thing right away.

I need a Rule.

The action I need is not provided, so I’m writing my own.

How to create a script for the Rules Wizard in Outlook

 
Do I get fooled by the object name ThisOutlookSession? No, the code survives a restart of Outlook if the project has been saved.
 
Now, there is "run a script" where I can choose my custom action. Yes, unfortunately, it’s only for incoming messages. [Announcement: This dead end was proudly presented to you by "Microsoft Outlook 2003".]
 
Custom actions for outgoing messages are still limited to the capable C++ developer. Mad world.
 
We’ll try that tomorrow. But that’s definitely not a just-stay-a-little-longer project anymore.
Advertisements
This entry was posted in Coding Horror. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s