A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Change the MiniIcon in a message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 16th 08, 05:00 PM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 1
Default Change the MiniIcon in a 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
  #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


  #3  
Old March 17th 08, 11:22 PM posted to microsoft.public.outlook.program_addins
Ghislain Bruyere
external usenet poster
 
Posts: 2
Default Change the MiniIcon in a 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 -


  #4  
Old March 18th 08, 01:59 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

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  
Old March 18th 08, 06:20 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Change the MiniIcon in a message

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


  #7  
Old March 19th 08, 03:15 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

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.