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

Tags: , ,

Change the MiniIcon in a message





 
 
Thread Tools Display Modes
  #11  
Old March 24th 08, 01:30 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default Change the MiniIcon in a message

Well, if you have a MailItem in your code (myMail) to use Redemption with it
would be something like this:

Redemption.SafeMailItem safMail = new Redemption.SafeMailItem();
const int PR_ICON_INDEX = 0x10800003;
safMail.Item = myMail;
int propTag = safMail.GetIdsFromNames
safMail.SetFields(PR_ICON_INDEX, -1);
myMail.Subject = myMail.Subject; // fool Outlook into thinking something has
changed
myMail.Save();

That would set the icon index. That would be the only part where you'd have
to use Redemption code, the rest would be similar to the code Ghislain
posted.

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


"j" wrote in message
...
Thanks for replay.

My AddIn developed on VSTO 2005, C#. Also i'm using Redemption
however didn't find any solution, could you please provide me some
sample regarding this.


Thanks in advance.


Ads
  #12  
Old March 25th 08, 06:05 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 73
Default Change the MiniIcon in a message

Thanks,

I tried your suggestion i wrote the same snippet (except of this line
of code: int propTag = safMail.GetIdsFromNames , i didn't understand
it's reason.)
also i added the Ghislain code, however i doesn't see the Icon.

Any suggestion??
  #13  
Old March 25th 08, 06:47 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default Change the MiniIcon in a message

The GetIdsFromNames line should have been deleted, I forgot to do that. It's
not needed since PR_ICON_INDEX isn't a MAPI named property but is a standard
property with a property tag value of 0x10800003.

With that code and the other code supplying the icons to use you should see
the icons unless the icon path isn't valid for your system or something else
is wrong. No errors?

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


"j" wrote in message
...
Thanks,

I tried your suggestion i wrote the same snippet (except of this line
of code: int propTag = safMail.GetIdsFromNames , i didn't understand
it's reason.)
also i added the Ghislain code, however i doesn't see the Icon.

Any suggestion??


  #14  
Old March 26th 08, 08:15 AM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 73
Default Change the MiniIcon in a message

Thanks.

I didn't get any error ( for test reason i provide dummy path for the
icen, and got en exception "File not found" ).

Any ideas??

Thanks in advance.
  #15  
Old March 26th 08, 01:44 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default Change the MiniIcon in a message

If you got a file not found error then you are providing an incorrect path
or the file doesn't exist.

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


"j" wrote in message
...
Thanks.

I didn't get any error ( for test reason i provide dummy path for the
icen, and got en exception "File not found" ).

Any ideas??

Thanks in advance.


  #16  
Old March 26th 08, 01:56 PM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 73
Default Change the MiniIcon in a message

Ken,

Concerning the "File not found" i excplicitly did it, just to chech
wheterer the code is running.
I provide a right path, and don't get any exception however the icon
doesn't chenged.


Any ideas??

Thank you.
  #17  
Old March 26th 08, 07:21 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default Change the MiniIcon in a message

No, I have no ideas beyond what's already been discussed.

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


"j" wrote in message
...
Ken,

Concerning the "File not found" i excplicitly did it, just to chech
wheterer the code is running.
I provide a right path, and don't get any exception however the icon
doesn't chenged.


Any ideas??

Thank you.


  #18  
Old March 27th 08, 03:11 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,615
Default Change the MiniIcon in a message

Here's what I suspect is happening: Setting any FormDescription properties in an individual item will have no effect, because current versions of Outlook ignore one-off FormDescription information. The solution would be to use a published custom form (or in Outlook 2007, a form region manifest).
--
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 - [MVP - Outlook]" wrote in message ...
No, I have no ideas beyond what's already been discussed.



"j" wrote in message
...
Ken,

Concerning the "File not found" i excplicitly did it, just to chech
wheterer the code is running.
I provide a right path, and don't get any exception however the icon
doesn't chenged.


Any ideas??

Thank you.


  #19  
Old March 30th 08, 08:29 AM posted to microsoft.public.outlook.program_addins
j
external usenet poster
 
Posts: 73
Default Change the MiniIcon in a message

Thanks Sue,

What do u meanby saying "The solution would be to use a published
custom form ", can explain please, or provide
some sample???
Another question, the AddIn developed for Outlook 2003 on VSTO 2005,
C# 2.0, also the AddIn works fine in Outlook 2007
the " Outlook 2007, a form region manifest", can be used in my
situation??? (I'm using Redemption in my code.)


Thanks in advance.
  #20  
Old March 30th 08, 10:46 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,615
Default Change the MiniIcon in a message

Try it for yourself: Create a new message form and on the (Properties) page set the icon. Publish it to your Personal Forms library, ignoring any prompt to check the "Send form definition with item box." Now, change the value of the MessageClass property of any message to the published form's class, e.g. "IPM.Note.MyForm." You should see the message icon change.

Form regions are for Outlook 2007 only.

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


"j" wrote in message ...
Thanks Sue,

What do u meanby saying "The solution would be to use a published
custom form ", can explain please, or provide
some sample???
Another question, the AddIn developed for Outlook 2003 on VSTO 2005,
C# 2.0, also the AddIn works fine in Outlook 2007
the " Outlook 2007, a form region manifest", can be used in my
situation??? (I'm using Redemption in my code.)


Thanks in advance.

 




Thread Tools
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 05:31 PM
OoO message does not change Patrick W. Outlook - Calandaring 0 October 23rd 07 10:58 AM
Change Colour of my Message Sajid Outlook - General Queries 2 August 29th 07 01:52 PM
Change colors for message headers DAnzaldi Outlook - Calandaring 0 October 12th 06 07:41 PM
how to change the mail message body Ram Add-ins for Outlook 10 January 27th 06 05:21 PM


All times are GMT +1. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Free Advertising - Personal Injury Lawyer Los Angeles - Mortgages - Colorado Flags - Fast Loans