Programatically change item's icon

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
 
D

Dmitry Streblechenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top