View Single Post
  #2  
Old January 3rd 07, 02:44 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Automating dealing with junk mail and spam

None of this is possible. The Blocked Senders list is not exposed in the Outlook object model. That's why you find no reference to it. It is stored as a hidden item in the user's default information store, in an undocumented binary format.

The Office programs that have macro recorders are in the minority. It's been years since any new recorder was added, probably because applications are much more complex than the early versions of Excel, etc. I don't expect macro recorders ever to be added to Office programs that don't already have them.

--
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

"Silent Ken" wrote in message ...
I am using Outlook 2003.

Firstly, I regularly program VBA macros in Excel. Like many users of VBA, I
originally learned to program Excel macros, from a start point of some
familiarity with the Basic language and with VB, by recording macros and then
reading the results. It is thus a little disappointing that Outlook does not
include the facility to record macros. This is a feature that should be added
sooner rather than later.

I would like to automate dealing with junk mail and spam mail. Reading the
Outlook VBA help I can find no mention of how to access the Blocked Senders
list within Outlook VBA. It does not appear to be listed as a collection in
the language reference. I would like to be able to retrieve items from the
list, edit items and add new ones, all within a VBA macro.

My basic idea is that I can auto detect mail in the spam folder, add the
sender to the blocked senders list, edit the entry to leave just the domain
name so that all mail from that domain is blocked and then auto delete the
mail. Similarly I can auto delete mail in the junk mail folder. Finally, I
can similarly treat junk and spam that makes it into my inbox by simply right
clicking on the mail and selecting an item from the context pop-up menu.

Is any of this possible? Can anyone help?

--

Best regards

Ken

Ads