View Single Post
  #6  
Old March 18th 08, 10:21 PM posted to microsoft.public.outlook.program_addins
Ghislain Bruyere
external usenet poster
 
Posts: 2
Default Change the MiniIcon in a message

It works !!!

Thank you very much.

For information, here you are my code

Dim currInspector As Outlook.Inspector =
Globals.ThisAddIn.Application.ActiveInspector
Dim message As Outlook.MailItem = CType(currInspector.CurrentItem,
Outlook.MailItem)
message.PropertyAccessor.SetProperty("http://schemas.microsoft.com/
mapi/proptag/0x10800003", 1)
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.Save()

Ghislain


On Mar 18, 6:20*pm, "Dmitry Streblechenko" wrote:
That was not a link, but a DASL property name that you need to use when
callingPropertyAccessor.SetProperty

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

"Ghislain Bruyere" wrote in message

...
Thanks for all those informations

Yes I'm using Outlook 2007 but your linkhttp://schemas.microsoft.com/mapi/proptag/0x10800003
doesn't work.

Ghislain

On 17 mar, 13:44, "Ken Slovak - [MVP - Outlook]"
wrote:



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 thePropertyAccessorobject
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
Optionshttp://www.slovaktech.com/products.htm


wrote in message


...


Hello,


I would like tochangethe MiniIcon of anemail.


I use this code but it doesn'tchangeit :


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.olDefaultRegistr**y)
message.Save()


Could you please help me ?


Have a nice day


Regards


Ghislain- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Hide quoted text -


- Show quoted text -


Ads