AutoFormatRules issue with outlook 2007 RRS feed

  • Question

  • Hi

    when we are creating autoformat rules from code we get some serious performacne issues on outlook 2007 with SP3. 

    We have about 20 Rules. When we create the same amount of rules manually we got no problens.

    Without SP3 or with other outlook versions everything works fine.

    On machine when we created a new user this user didnt have the problem altough it was the same machine and nothing chagned on outlook or the formating rules.

    Here is a example code how we do it.

    Microsoft.Office.Interop.Outlook.Folder folder = Application.ActiveExplorer().CurrentFolder as Microsoft.Office.Interop.Outlook.Folder;
            Microsoft.Office.Interop.Outlook.TableView tableview = folder.CurrentView as Microsoft.Office.Interop.Outlook.TableView;
            Microsoft.Office.Interop.Outlook.AutoFormatRules rules = tableview.AutoFormatRules;
            for (int i = 0; i < 15; i++)
                Microsoft.Office.Interop.Outlook.AutoFormatRule rule = rules.Add("Test" + i);
                rule.Enabled = true;
                rule.Font.Italic = true;
                rule.Font.Color = MSOutlook.OlColor.olColorRed;
                rule.Filter = "\"{00020329-0000-0000-C000-000000000046}/Testfield/0000001f\" = 'Test" + i + "'";

    Can someone give us a hint on how to improve it?

    Any hints?

    Wednesday, February 27, 2013 11:59 AM


  • Hi Gentlehag,

    It's based on my experience that differen't use account reference that different store and the rules will not affect the folders, items which don't belong the particular store.

    Have a good day,


    Thursday, February 28, 2013 1:22 AM