I find dealing with the blocked senders list to be a total waste of time, since spammer addresses and domains change by the minute, and certainly not worth the extra effort beyond simply deleting the messages. If the Outlook junk filter isn't doing the job you want, maybe it's time to try another tool, such as SpamBayes?
--
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 ...
Thankyou Sue. Needless to say, your answer is disappointing to me. But there
is no doubting that it is the full and definitive answer. At least I know not
to waste any more time trying to achieve it. I shall have to stick to the
laborious method.
A pox on all spammers and junk mail distributors!
"Sue Mosher [MVP-Outlook]" wrote:
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.
"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