View Single Post
  #1  
Old January 3rd 07, 11:26 AM posted to microsoft.public.outlook.program_vba
Silent Ken
external usenet poster
 
Posts: 3
Default Automating dealing with junk mail and spam

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