darkwolf.mca
Member
- Outlook version
- Outlook 2010 32 bit
- Email Account
- Exchange Server
Hi all,
I'm newbie so please be patient
I trying to understand if it exists a way to update an existing rule using VBA.
Within a routine I create a rule like the following:
Set myRules = Application.Session.DefaultStore.GetRules()
Set rl = myRules.Item("Photos")
Set olConditionSubject = rl.Conditions.Subject
With olConditionSubject
.Enabled = True
.Text = Array("White", "Black")
End With
myRules.Save
and that's fine... it works as desired... but how can I add one or more words?
If I create a new routine with
> ..
> ..
With olConditionSubject
.Enabled = True
.Text = Array("Red", "Green")
End With
it replace the one already present... how can I update the rule using VBA so it can filter on all words?
Cheers
Mauro
I'm newbie so please be patient
I trying to understand if it exists a way to update an existing rule using VBA.
Within a routine I create a rule like the following:
Set myRules = Application.Session.DefaultStore.GetRules()
Set rl = myRules.Item("Photos")
Set olConditionSubject = rl.Conditions.Subject
With olConditionSubject
.Enabled = True
.Text = Array("White", "Black")
End With
myRules.Save
and that's fine... it works as desired... but how can I add one or more words?
If I create a new routine with
> ..
> ..
With olConditionSubject
.Enabled = True
.Text = Array("Red", "Green")
End With
it replace the one already present... how can I update the rule using VBA so it can filter on all words?
Cheers
Mauro