G
Gilles Pion
Hello everybody,
I'm unable to make the following code works, the line
"oRule.Conditions.OnLocalMachine.Enabled = False" always produce this message:
"execution error '-9707964987 (c6204005)':
invalid operation. Unable to activate this rule action because the rule is
readonly, is invalid for this rule kind or conflicts with another rule action""
(please take into account that since I'm using french version of Outlook this is
a translation, the equivalent english error text may be slightly different )
And, here's my code:
Sub FixRules()
Dim oRules As Outlook.Rules
Dim oRule As Outlook.Rule
Set oRules = Application.Session.DefaultStore.GetRules()
For Each oRule In oRules
If oRule.Conditions.OnLocalMachine.Enabled Then
'MsgBox ("processing " & oRule.name)
oRule.Conditions.OnLocalMachine.Enabled = False
End If
Next oRule
End Sub
Thanks for any help,
I'm unable to make the following code works, the line
"oRule.Conditions.OnLocalMachine.Enabled = False" always produce this message:
"execution error '-9707964987 (c6204005)':
invalid operation. Unable to activate this rule action because the rule is
readonly, is invalid for this rule kind or conflicts with another rule action""
(please take into account that since I'm using french version of Outlook this is
a translation, the equivalent english error text may be slightly different )
And, here's my code:
Sub FixRules()
Dim oRules As Outlook.Rules
Dim oRule As Outlook.Rule
Set oRules = Application.Session.DefaultStore.GetRules()
For Each oRule In oRules
If oRule.Conditions.OnLocalMachine.Enabled Then
'MsgBox ("processing " & oRule.name)
oRule.Conditions.OnLocalMachine.Enabled = False
End If
Next oRule
End Sub
Thanks for any help,