Thanks for reply,
How can we use COM addin to replace the rule?Can I get some example? or more explanation.
I have created COM addin and used rule object and rule can seen in rule wizard.
Outlook.MAPIFolder inbox= this.Application.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
Outlook.MAPIFolder targetfolder = inbox.Folders["Test"];
rules = this.Application.Session.DefaultStore.GetRules();
rule = rules.Create("TestRule", Microsoft.Office.Interop.Outlook.OlRuleType.olRuleReceive);
Outlook.TextRuleCondition sub = rule.Conditions.Subject;
sub.Enabled = true;
sub.Text = new string[] {"Test Subject"};
movecopy = rule.Actions.MoveToFolder;
movecopy.Enabled = true;
movecopy.Folder = targetfolder;
rule.Execute(true, inbox, false, Outlook.OlRuleExecuteOption.olRuleExecuteUnreadMessages);
How COM addin can use to create hidden rule?
If you use the rules object model the resulting rule cannot be hidden, it
will show up in the rules wizard. You would need to code the equivalent of
the rule as macro code or a COM addin and replace the rule completely.
--
"nitwalke@gmail.com" <nitwalkegmail.com.43wqdm@invalid> wrote in message
news:nitwalkegmail.com.43wqdm@invalid...
>
> Hi all,
>
> I am developing outlook plug-in for outlook 2007. I have created
> programmatic- ally rule and it works fine.This rule can see in 'Rules
> and Alert' window.Can user hide this rule? or how can create hidden rule
> and set it's execution order first?
>
> Thanks in advance.
>
>
> --
> nitwalke@gmail.com
>
>