A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Change Date Range in existing Outlook rule with a macro



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 8th 13, 07:05 PM
Chesterton Chesterton is offline
Junior Member
 
First recorded activity at Outlookbanter: Feb 2013
Posts: 1
Default 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 that specifies a date range condition for a rule. Only with the rules wizard can I do that. What's not clear to me is if it is possible to MODIFY the date range, in a macro, of an existing rule that I did create with the rules wizard. With the following code I can zero in on the data structure that contains date range of an existing rule:

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

If I set a breakpoint and look at the data structure in the macro 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 Date Range? Is is buried down in one of these structures?
Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to import Excel range of dates into Outlook Calender Philip Outlook and VBA 1 September 12th 08 02:51 PM
Outlook Query for Contacts that have been Changed by Date Range Query for Contacts by Date Range? Outlook - Using Contacts 1 October 12th 07 12:10 AM
Can I print all Appointments in a date range? (Outlook 2003) Graphogoddess Outlook - Calandaring 0 April 8th 07 11:20 PM
I want to change the display date range in Outlook 2003. Mynyel Outlook - Calandaring 0 March 19th 07 03:35 PM
Calendar Date Range Yoav Outlook - Calandaring 0 March 24th 06 12:33 PM


All times are GMT +1. The time now is 05:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.