Anybody have sample code of how to access the blocked Senders list in outlook 2003?

Just starting my search and have found a few old threads but wonder if there is a way to do this using the new VSOT for outlook

Want to create a toolbar button that allows me to add a domain to the block senders list.

Thanks.

 

 




Answer this question

Anybody have sample code of how to access the blocked Senders list in outlook 2003?

  • Neil_F

    Hello John,

    Thank you very much.  The only problem I see is reliably coming up with myusername.

    I checked my registry and it's as follows:

    HKEY_CURRENT_USER\Software\Microsoft\Windows
    NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook

    I don't think it's your user name so much as it's the profile name.  I'm assuming there is an object you can call to get the current profile name being used   Any idea as to how to do that

    Also, just to make sure I'm clear, all I would need to do is take a domain name string, convert it to Unicode and add it to the registry value

    Thanks.

    kris

     



  • skaranam

    KFrost,

    You are in luck: it is stored in the registry, so you can just use the Microsoft.Win32 namespace and create an instance of RegistryKey and other types to manipulate the registry.

    Where is the Key

    HKEY_CURRENT_USER\Software\Microsoft\Windows
    NT\CurrentVersion\Windows Messaging Subsystem\Profiles\myusername\0a0d020000000000c000000000000046\001f0419

    There are loads of value pairs in there, and they are stored in UNICODE format (you'll need to convert them). Here are the ones you care about:

    Blocked Senders- 001f041a
    Safe senders- 001f0418
    Safe recips- 001f0419

    This should answer it for you!

    John.



  • Anybody have sample code of how to access the blocked Senders list in outlook 2003?