![]() |
| 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. |
|
|||||||
| Tags: change, message, miniicon |
|
|
Thread Tools | Display Modes |
|
#11
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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 | |
|
|
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 |