Yes, you can do it with code. You would have to create the custom forms
using the Outlook forms designer. The only change for each form would be a
custom MessageClass and setting the Icon properties (large and small) in the
Properties tab to the icons you want. You can look at the normal icons used
to get the size and configuration of the existing icons and match that in
your custom icons.
The custom forms could be deployed with your code and published using code.
Then your addin would assign the appropriate MessageClass to each item you
want displayed with a custom icon (read, unread, replied to, etc.) and make
sure that the PR_ICON_INDEX property (0x10800003) is set to -1.
If PR_ICON_INDEX is a positive number it's an index into the normal icon
list. If -1 then the custom icon will be used for that custom MessageClass.
Setting PR_ICON_INDEX is the only thing that can't be done using the Outlook
object model in Outlook 2003. For that you'd have to hope that the property
is set correctly or use something like Redemption
(
www.dimastr.com/redemption) to set the property. You couldn't use CDO 1.21
or Extended MAPI, they aren't supported for use in managed code.