Programatically change item's icon

  • Thread starter Thread starter dorutzu
  • Start date Start date
D

dorutzu

Hi,

I would like to be able to put a different custom icon on each e-mail
in a folder. In order to achive this, I thought of the 2 possibilites
below:

1) Add my custom icons to the default ones in Outlook's resources
(probably some DLLs), and then programatically change my mailitems'
PR_ICON_INDEX field. The problem here is that I don't know where
Outlook keeps these resources (default icons), and if/how can I add my
icons to this collection (programatically would be super).

2) Create a custom form for my mailitems, set PR_ICON_INDEX field to
-1 (to use the custom form icon), and then, somehow (if you can help
me here :) programatically change the form's icon for each item, so
they will look diferent. The problem here is that even if I can change
each icon, I don't know if this change will be persistent and won't
mess up the form & stuff.

3)...any other ideas?

I would apreciate any ideas/suggestions/etc.

Thanks for all your help,
Doru
 
That's about it.
For #2, you'd need to change the message class (PR_MESSAGE_CLASS)
appropriately.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top