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

Eliminating Weekends Programmatically in Recurring Appointment



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 7th 06, 04:28 PM posted to microsoft.public.outlook.program_vba
clarkel
external usenet poster
 
Posts: 4
Default Eliminating Weekends Programmatically in Recurring Appointment

I have a macro which upon receipt of an E-Mail (with text info containing key
words) will use the mail info to create an Appointment item.

The mail info may contain a recurring event specified as a DAILY recurrence.
The info in the mail may have a recurrence fall on a Saturday or Sunday. I
cannot control the mail content but would like the macro to eliminate any
Saturday or Sunday recurrences (i.e. only create the weekday recurrences).

Any way to do this in scriipt ?

Thanks
Ads
  #2  
Old February 7th 06, 04:56 PM posted to microsoft.public.outlook.program_vba
Dave Kane [MVP - Outlook]
external usenet poster
 
Posts: 33
Default Eliminating Weekends Programmatically in Recurring Appointment

That is determined by the DayOfWeekMask property of the appointment's
RecurrencePattern object. For an appointment that recurs every weekday you
would set these properties on the RecurrencePattern:
RecurrenceType = olRecursDaily
Interval = 1
DayOfWeekMask = olMonday or olTuesday or olWednesday or olThursday or
olFriday

"clarkel" wrote in message
...
I have a macro which upon receipt of an E-Mail (with text info containing
key
words) will use the mail info to create an Appointment item.

The mail info may contain a recurring event specified as a DAILY
recurrence.
The info in the mail may have a recurrence fall on a Saturday or Sunday.
I
cannot control the mail content but would like the macro to eliminate any
Saturday or Sunday recurrences (i.e. only create the weekday recurrences).

Any way to do this in scriipt ?

Thanks



  #3  
Old February 7th 06, 07:11 PM posted to microsoft.public.outlook.program_vba
clarkel
external usenet poster
 
Posts: 4
Default Eliminating Weekends Programmatically in Recurring Appointment

I may have done something wrong wth the olRecursDaily and DayofWeekMask
combination since I cud not get it to work together.

Even though I was working with an event originally defined as daily
recurrence, I chanced changing the olRecursDaily flag to olRecursWeekly (with
all other parameters held the same) then the DayofWeekMask worked as desired
in the several test cases I ran.

Appreciate the input.

"Dave Kane [MVP - Outlook]" wrote:

That is determined by the DayOfWeekMask property of the appointment's
RecurrencePattern object. For an appointment that recurs every weekday you
would set these properties on the RecurrencePattern:
RecurrenceType = olRecursDaily
Interval = 1
DayOfWeekMask = olMonday or olTuesday or olWednesday or olThursday or
olFriday

"clarkel" wrote in message
...
I have a macro which upon receipt of an E-Mail (with text info containing
key
words) will use the mail info to create an Appointment item.

The mail info may contain a recurring event specified as a DAILY
recurrence.
The info in the mail may have a recurrence fall on a Saturday or Sunday.
I
cannot control the mail content but would like the macro to eliminate any
Saturday or Sunday recurrences (i.e. only create the weekday recurrences).

Any way to do this in scriipt ?

Thanks




  #4  
Old February 7th 06, 11:22 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Eliminating Weekends Programmatically in Recurring Appointment

If you set DayofWeekMask you have to use olRecursWeekly. That's how it
works, despite the documentation in Help.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"clarkel" wrote in message
...
I may have done something wrong wth the olRecursDaily and DayofWeekMask
combination since I cud not get it to work together.

Even though I was working with an event originally defined as daily
recurrence, I chanced changing the olRecursDaily flag to olRecursWeekly
(with
all other parameters held the same) then the DayofWeekMask worked as
desired
in the several test cases I ran.

Appreciate the input.


 




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
Recurring appointment does not show in all views Colin Outlook - Calandaring 2 February 6th 06 09:31 PM
Recurring appointment conflict Elan Outlook - Using Contacts 1 February 6th 06 09:35 AM
Recurring appointment/events linked to other recurring appointment uaewhitey Outlook - Calandaring 0 February 2nd 06 07:55 PM
Can I skip one occurrence of a recurring APPOINTMENT? Sam Outlook - Calandaring 2 January 23rd 06 02:40 PM
How to Create Exceptions to Recurring Appointment Sabrina Outlook - General Queries 1 January 11th 06 02:10 PM


All times are GMT +1. The time now is 01:56 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.