Changing mail item icons using VSTO 2005 (C#.Net)

R

RAMS

I need to change at run-time and possibly customize the icon (usually an
envelope to other custom icons) shown in each mail item we see when we open a
folder such as the Inbox. I'm using VSTO and C#. Can this be done and how?

thanks
RAMS
 
K

Ken Slovak - [MVP - Outlook]

You would need to create a custom form with a custom MessageClass and assign
your custom icons to that MessageClass, then convert the items you want to
show that icon to that custom MessageClass.
 
S

Sue Mosher [MVP-Outlook]

Also, if you're using Outlook 2007, you can use a form region manifest and registration instead of a published custom form. See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2199745&SiteID=1&mode=1 for a discussion of this approach.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


Ken Slovak - said:
You would need to create a custom form with a custom MessageClass and assign
your custom icons to that MessageClass, then convert the items you want to
show that icon to that custom MessageClass.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


RAMS said:
I need to change at run-time and possibly customize the icon (usually an
envelope to other custom icons) shown in each mail item we see when we
open a
folder such as the Inbox. I'm using VSTO and C#. Can this be done and how?

thanks
RAMS
 
R

RAMS

Thanks for the suggestion Ken.
whether we can do that through Coding( Using VSTO & C#.NET, and I am using
outlook 2003 ) ?
 
R

RAMS

Hi Ken,
I need to have different custom icons depending upon the status of the mail
items
for eg Unread Mail,read mail,archived mail, ....
I want to give custom icons for these status
Is this possible
 
R

RAMS

Thanks Sue,
But i am using Outlook 2003 only and i want to change different icons
(depending upon various conditions , such as Unread Mails,Archieved Mails )
and i want this to be done through coding(VSTO 2005 with C#.Net).
Can this be done ?
 
K

Ken Slovak - [MVP - Outlook]

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.
 
K

Ken Slovak - [MVP - Outlook]

See my other answer, it's possible with a custom MessageClass for each type
you want.
 

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