Change Date Range in existing Outlook rule with a macro



I understand that, in a macro, I am not able to create a new rule tha
specifies a date range condition for a rule. Only with the rules wizar
can I do that. What's not clear to me is if it is possible to MODIFY th
date range, in a macro, of an existing rule that I did create with th
rules wizard. With the following code I can zero in on the dat
structure that contains date range of an existing rule:

For x = 1 To currentRule.Conditions.count
If currentRule.Conditions.Item(x).ConditionType = olConditionDateRang
'Do something
End If

If I set a breakpoint and look at the data structure in the macr
editor, I see these items:

+ Application
- Class (olRuleCondition)
- ConditionType (olCondtionDateRange)
- Enabled (True)
+ Parent
+ Session

Is there a way to manipulate one of these to change this existing Dat
Range? Is is buried down in one of these structures


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question