The value of RuleCondition.Enabled for OnLocalMachine may always be set to True no matter what code you use if other conditions in the rule mandate that setting. The example in the Help for the Object Browser mentions the condition olConditionAccount as one of those settings. Is it possible that your rule also sets the state of another condition that's forcing OnLocalMachine.Enabled to True?
-- 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
"Gilles Pion" <nosuchuser[ at ]nosuchdomain.com> wrote in message news:g66ll417qparvkotug8ouhp1iepgogoa26[ at ]4ax.com...
[Quoted Text] > Ref: <18i6j8glz43ux.ibdha7p66n8u.dlg[ at ]40tude.net> de "Michael Bauer [MVP - > Outlook]" <mb[ at ]mvps.org> >> >>See the object browser (f2): The OnLocalMachine property is read-only. > > That's very strange: since it is possible to modify this property using > Outlook > user interface, I thought that it would automatically imply it to be > read/write. > This is somewhat disappointing. > > And, following your advice, I've checked the object browser. Even more > strangely, others RuleConditions members (for example the "Importance" > property) > are also documented as readonly but the "enabled" value *can* be changed. > Have a > look at those lines from VBA execution window: > > oRule.Conditions.Importance.Enabled = True > ? oRule.Conditions.Importance.Enabled > Vrai ' // my outlook speaks french... > oRule.Conditions.Importance.Enabled = False > ? oRule.Conditions.Importance.Enabled > Faux > > but > oRule.Conditions.OnLocalMachine.Enabled = False > still produce the error > > Any clues to find a method to change that value using VBA code?
|