PC Review


Reply
Thread Tools Rate Thread

Changing Icon of message class

 
 
Tobias Böhm
Guest
Posts: n/a
 
      7th Jul 2009
Hello,

here's what I want to do. My AddIn is creating outlook-folders at
runtime. One for mail one for tasks and another one for tasks. The
items of the last task folder should have a different icon (can be one
of the available outlook-icons).

I found
http://groups.google.com/group/micro...d7d93a561a3a07
and did what Sue Mosher suggested. I created a Form, published it,
changed the MessageClass of an item, which then used the new form but
the icon didn't change. Furthermore, the MessageClass of that item was
reset after restarting outlook.

I fifured that I had to change the default class items in that folder
get when created. Also I can't change the Default message class of a
folder. I can change the PR_DEF_MSG_CLASS property via MAPI which
according to OutlookSpy works. But OutlookSpy also says that the
DefaultMessageClass property of the TaskITem property hasn't changed.

I think I'm missing something here. What is the simplest way to
achieve what I want to achieve?

Thanks,
Tobi
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      7th Jul 2009
When you publish a form of any base MessageClass it will use the Post icon
unless you explicitly change the icon in the Properties tab of the form when
it's in design mode. You need to change both the large and small icons for
that new custom MessageClass before you publish the form. At that time you
also should set the Version string property and increment or change it for
every published change you make to the form to avoid forms cache corruption.

After that any item that uses that custom MessageClass will use the icons
you set for that MessageClass.

The default class of a folder is always an intrinsic Outlook item type, such
as PR_CONTAINER_CLASS == IPF.Task for all task type folders.

The PR_DEF_POST_MSGCLASS property can be changed to alter what MessageClass
is used when a new item is created in that folder. That has a property tag
of 0x36E5001E or in DASL syntax it's
"http://schemas.microsoft.com/mapi/proptag/0x36E5001E". If you want new
items created using your custom MessageClass you would set or create that
property to the custom MessageClass name string.

Any icon can be used (large and small) as long as they meet the requirements
for the form icons (16x16 for large icons and 32x32 for small ones).

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


"Tobias Böhm" <(E-Mail Removed)> wrote in message
news:8b3677cd-3474-4bc3-8d4b-(E-Mail Removed)...
> Hello,
>
> here's what I want to do. My AddIn is creating outlook-folders at
> runtime. One for mail one for tasks and another one for tasks. The
> items of the last task folder should have a different icon (can be one
> of the available outlook-icons).
>
> I found
> http://groups.google.com/group/micro...d7d93a561a3a07
> and did what Sue Mosher suggested. I created a Form, published it,
> changed the MessageClass of an item, which then used the new form but
> the icon didn't change. Furthermore, the MessageClass of that item was
> reset after restarting outlook.
>
> I fifured that I had to change the default class items in that folder
> get when created. Also I can't change the Default message class of a
> folder. I can change the PR_DEF_MSG_CLASS property via MAPI which
> according to OutlookSpy works. But OutlookSpy also says that the
> DefaultMessageClass property of the TaskITem property hasn't changed.
>
> I think I'm missing something here. What is the simplest way to
> achieve what I want to achieve?
>
> Thanks,
> Tobi


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing the class doesn't change the icon! lee.james@spartan.ab.ca Microsoft Outlook Form Programming 3 30th Dec 2006 03:10 PM
Message class not changing form... Ian Roberts via OfficeKB.com Microsoft Outlook Form Programming 1 27th Jun 2005 04:43 PM
problem changing message class Bert Microsoft Outlook Form Programming 4 5th May 2004 08:20 AM
changing icon for custom message class that uses standard IPM.Note form robert dugal Microsoft Outlook Program Addins 2 19th Nov 2003 11:49 AM
Message Class Icon Michael Tissington Microsoft Outlook VBA Programming 2 7th Nov 2003 03:17 AM


Features
 

Advertising
 

Newsgroups
 


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