View Single Post
  #2  
Old March 17th 08, 01:44 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Change the MiniIcon in a message

Does the form have a custom message class?

If you look at an item using the form with a MAPI viewer such as OutlookSpy
(www.dimastr.com) or MFCMAPI do you see a property there PR_ICON_INDEX? If
so does it have a value of -1? You would need to set that if it's not set
to -1 and is there.

That property isn't exposed in the Outlook object model so you'd have to use
a different API such as CDO or Extended MAPI or Redemption if not using
Outlook 2007. For Outlook 2007 you can use the PropertyAccessor object with
a property tag of "http://schemas.microsoft.com/mapi/proptag/0x10800003".

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


wrote in message
...
Hello,

I would like to change the MiniIcon of an email.

I use this code but it doesn't change it :

Dim currInspector As Outlook.Inspector =
Globals.ThisAddIn.Application.ActiveInspector
Dim message As Outlook.MailItem =
CType(currInspector.CurrentItem, Outlook.MailItem)
message.FormDescription.Icon = "C:\Program Files\Microsoft
Office\Office12\FORMS\1033\TASKACCL.ICO"
message.FormDescription.MiniIcon = "C:\Program Files\Microsoft
Office\Office12\FORMS\1033\TASKACCS.ICO"

message.FormDescription.PublishForm(Outlook.OlForm Registry.olDefaultRegistry)
message.Save()

Could you please help me ?

Have a nice day

Regards

Ghislain


Ads