View Single Post
  #5  
Old August 13th 09, 07:28 AM posted to microsoft.public.outlook.program_addins
Teodora Gancheva[_2_]
external usenet poster
 
Posts: 9
Default Categories not persisted between sessions in Outlook 2007

Hi,

In the meantime I have tested the code on 5 different machines with Outlook
2007. It seems to be working on the RTM and SP1 versions. The issue only
exists with SP2.
Unfortunatelly, adding the categories upon start up is not applicable in my
scenario, or at the very least is very difficult. The reason is that I am
assigning different categories to different mail items upon user action, in
my case that is import of the email into an external system. I could probably
save the categories to some file and then upon start up read from that file
....
Anyways, let's see what MS have to say about this.

Thanks,
Teodora Gancheva

"Ken Slovak - [MVP - Outlook]" wrote:

I'm seeing it as a bug, it's not persisting here either. Structure your code
so you add that custom category when your code starts up.

I'll report it to MS and see what they say.

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


"Teodora Gancheva" wrote in
message ...
This is how I add the category to Outlook category list:

NameSpace mapiNameSpace = outlook.GetNamespace("MAPI");
mapiNameSpace.Categories.Add(categoryName,
OlCategoryColor.olCategoryColorNone,
OlCategoryShortcutKey.olCategoryShortcutKeyNone);

And then I assign the category to the MailItem:

mail.Categories = categoryName;
mail.Save();

Thanks,
Teodora Gancheva



Ads