![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
Thanks for all those informations
Yes I'm using Outlook 2007 but your link http://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 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 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 - |
#4
|
|||
|
|||
![]()
What do you mean it doesn't work? That's the correct property tag for
PR_ICON_INDEX. That property may not be there, it's not a required property on an item. If it's not there Outlook automatically uses the default icon for that item type. If it's there an index value means Outlook is using one of its standard item icons, if it's set to -1 it uses whatever icons you specify in the FormDescription.Icon and .MiniIcon properties. -- 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 "Ghislain Bruyere" wrote in message ... Thanks for all those informations Yes I'm using Outlook 2007 but your link http://schemas.microsoft.com/mapi/proptag/0x10800003 doesn't work. Ghislain |
#5
|
|||
|
|||
![]()
That was not a link, but a DASL property name that you need to use when
calling PropertyAccessor.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 link http://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 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 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 - |
#6
|
|||
|
|||
![]()
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 - |
#7
|
|||
|
|||
![]()
Set PR_ICON_INDEX to -1, not 1.
-- 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 "Ghislain Bruyere" wrote in 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change Redemption CreationTime of the new message | MA[_2_] | Outlook and VBA | 4 | October 30th 07 06:31 PM |
OoO message does not change | Patrick W. | Outlook - Calandaring | 0 | October 23rd 07 11:58 AM |
Change Colour of my Message | Sajid | Outlook - General Queries | 2 | August 29th 07 02:52 PM |
Change colors for message headers | DAnzaldi | Outlook - Calandaring | 0 | October 12th 06 08:41 PM |
how to change the mail message body | Ram | Add-ins for Outlook | 10 | January 27th 06 06:21 PM |