| Author |
Message |
Mathias Erlandsson
Guest
|
Posted:
Tue Nov 23, 2004 7:45 pm Post subject:
Create recurring appointment with cdo |
|
|
I'v created a recurring appointment with cdo and when I open it in owa and
select view the entire series I get the following message.
Recurrence: Unable to determine the recurrence pattern.
The problem is that the property urn:schemas:calendar:rrule doesn't look the
same as when I create the same reccurence in owa. With my code I get
FREQ=MONTHLY;COUNT=10;WKST=MO;INTERVAL=1;BYSETPOS=2;BYDAY=TH
and with owa
FREQ=MONTHLY;COUNT=10;WKST=SU;INTERVAL=1;BYDAY=2TH
How did owa get the number 2 in the BYDAY field? If i manually set this with
my generated appointment, everything looks ok in owa.
I'm using VS .NET 2003 ASP .NET with C# as language
This is how I'm saving the recurrence:
CDO.IRecurrencePattern iRPatter = iRPatters.Add("Add");
iRPatter.Frequency = CDO.CdoFrequency.cdoMonthly;
iRPatter.ByPosition.Add( 2 );
iRPatter.DaysOfWeek.Add( (int)CDO.CdoDayOfWeek.cdoThursday);
iRPatter.Instances = Convert.ToInt32( lblRecur_endOccurrences.Value.Trim() );
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Wed Nov 24, 2004 11:33 am Post subject:
Re: Create recurring appointment with cdo |
|
|
I think your RRule is a little ambiguous (actually that whole RFC can be a
bit that way) but when you using BYSETPOS in a monthly rule (they way
outlook understands and uses it) your saying this appointment is going to
happen on that particular day of the month. EG in your rule your saying the
2nd of the month. The ambiguous part is when you also use the BYDAY=TH part
so your saying the meeting occurs everymonth on the second only if its a
Thursday ? If you wanted it to occur on the 2nd of every month your RRule
should look like FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYDAY=SU, MO, TU, WE, TH,
FR, SA;BYSETPOS=2;WKST=SU . Now if you want the meeting to occur on the 2nd
Thursday of the month then what OWA is doing is in line with what the RFC
states ref http://www.ietf.org/rfc/rfc2445.txt
" The BYDAY rule part specifies a COMMA character (US-ASCII decimal 44)
separated list of days of the week; MO indicates Monday; TU indicates
Tuesday; WE indicates Wednesday; TH indicates Thursday; FR indicates
Friday; SA indicates Saturday; SU indicates Sunday.
Each BYDAY value can also be preceded by a positive (+n) or negative
(-n) integer. If present, this indicates the nth occurrence of the
specific day within the MONTHLY or YEARLY RRULE. For example, within
a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday
within the month, whereas -1MO represents the last Monday of the
month. If an integer modifier is not present, it means all days of
this type within the specified frequency. For example, within a
MONTHLY rule, MO represents all Mondays within the month."
I think it all comes down to how that particular vendor implements this RFC
but I believe that's the way it works for OWA and Outlook its possible that
this may work differently on say Apple iCal.
Cheers
Glen
"Mathias Erlandsson" <MathiasErlandsson@discussions.microsoft.com> wrote in
message news:659A1B86-8307-4F68-A302-BECD6EC76B0A@microsoft.com...
| Quote: | I'v created a recurring appointment with cdo and when I open it in owa and
select view the entire series I get the following message.
Recurrence: Unable to determine the recurrence pattern.
The problem is that the property urn:schemas:calendar:rrule doesn't look
the
same as when I create the same reccurence in owa. With my code I get
FREQ=MONTHLY;COUNT=10;WKST=MO;INTERVAL=1;BYSETPOS=2;BYDAY=TH
and with owa
FREQ=MONTHLY;COUNT=10;WKST=SU;INTERVAL=1;BYDAY=2TH
How did owa get the number 2 in the BYDAY field? If i manually set this
with
my generated appointment, everything looks ok in owa.
I'm using VS .NET 2003 ASP .NET with C# as language
This is how I'm saving the recurrence:
CDO.IRecurrencePattern iRPatter = iRPatters.Add("Add");
iRPatter.Frequency = CDO.CdoFrequency.cdoMonthly;
iRPatter.ByPosition.Add( 2 );
iRPatter.DaysOfWeek.Add( (int)CDO.CdoDayOfWeek.cdoThursday);
iRPatter.Instances = Convert.ToInt32(
lblRecur_endOccurrences.Value.Trim() ); |
|
|
| Back to top |
|
 |
Mathias Erlandsson
Guest
|
Posted:
Wed Nov 24, 2004 12:25 pm Post subject:
Re: Create recurring appointment with cdo |
|
|
Thanks for the reply.
Since I'm using CDO to create the appointment, I don't get to set the
RRule-property manually. The question is how do I use CDO to create a
recurring appointment that owa understands. My save-method works with every
case except when I set the recurrence to smething like the 2:nd Thursday of
every month.
How can I, using CDO, set a positive or negative value in the
BYDAY-property. Should I really have to edit the RRule directly?
/Mathias
"Glen Scales [MVP]" wrote:
| Quote: | I think your RRule is a little ambiguous (actually that whole RFC can be a
bit that way) but when you using BYSETPOS in a monthly rule (they way
outlook understands and uses it) your saying this appointment is going to
happen on that particular day of the month. EG in your rule your saying the
2nd of the month. The ambiguous part is when you also use the BYDAY=TH part
so your saying the meeting occurs everymonth on the second only if its a
Thursday ? If you wanted it to occur on the 2nd of every month your RRule
should look like FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYDAY=SU, MO, TU, WE, TH,
FR, SA;BYSETPOS=2;WKST=SU . Now if you want the meeting to occur on the 2nd
Thursday of the month then what OWA is doing is in line with what the RFC
states ref http://www.ietf.org/rfc/rfc2445.txt
" The BYDAY rule part specifies a COMMA character (US-ASCII decimal 44)
separated list of days of the week; MO indicates Monday; TU indicates
Tuesday; WE indicates Wednesday; TH indicates Thursday; FR indicates
Friday; SA indicates Saturday; SU indicates Sunday.
Each BYDAY value can also be preceded by a positive (+n) or negative
(-n) integer. If present, this indicates the nth occurrence of the
specific day within the MONTHLY or YEARLY RRULE. For example, within
a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday
within the month, whereas -1MO represents the last Monday of the
month. If an integer modifier is not present, it means all days of
this type within the specified frequency. For example, within a
MONTHLY rule, MO represents all Mondays within the month."
I think it all comes down to how that particular vendor implements this RFC
but I believe that's the way it works for OWA and Outlook its possible that
this may work differently on say Apple iCal.
Cheers
Glen
"Mathias Erlandsson" <MathiasErlandsson@discussions.microsoft.com> wrote in
message news:659A1B86-8307-4F68-A302-BECD6EC76B0A@microsoft.com...
I'v created a recurring appointment with cdo and when I open it in owa and
select view the entire series I get the following message.
Recurrence: Unable to determine the recurrence pattern.
The problem is that the property urn:schemas:calendar:rrule doesn't look
the
same as when I create the same reccurence in owa. With my code I get
FREQ=MONTHLY;COUNT=10;WKST=MO;INTERVAL=1;BYSETPOS=2;BYDAY=TH
and with owa
FREQ=MONTHLY;COUNT=10;WKST=SU;INTERVAL=1;BYDAY=2TH
How did owa get the number 2 in the BYDAY field? If i manually set this
with
my generated appointment, everything looks ok in owa.
I'm using VS .NET 2003 ASP .NET with C# as language
This is how I'm saving the recurrence:
CDO.IRecurrencePattern iRPatter = iRPatters.Add("Add");
iRPatter.Frequency = CDO.CdoFrequency.cdoMonthly;
iRPatter.ByPosition.Add( 2 );
iRPatter.DaysOfWeek.Add( (int)CDO.CdoDayOfWeek.cdoThursday);
iRPatter.Instances = Convert.ToInt32(
lblRecur_endOccurrences.Value.Trim() );
|
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Thu Nov 25, 2004 6:04 am Post subject:
Re: Create recurring appointment with cdo |
|
|
What you need to do is instead of using .DaysOfWeek you need to use
..Weekdays . These both set the same element in the RRule the difference is
that .DaysOfWeek is a integers collection with only one dimension (which
contains the CdoDayOfWeek enum). .DaysOfWeek is a two dimensional integers
collection the first dimension contains an integer for the week of the month
(in your case this would be 2) and the second dimension contains the
CdoDayOfWeek enum.
Something like this works in VBS
Weekdays.add(array(2,4))
Cheers
Glen
"Mathias Erlandsson" <MathiasErlandsson@discussions.microsoft.com> wrote in
message news:8DCF5D75-FA91-439D-BCD1-AB73A098CD07@microsoft.com...
| Quote: | Thanks for the reply.
Since I'm using CDO to create the appointment, I don't get to set the
RRule-property manually. The question is how do I use CDO to create a
recurring appointment that owa understands. My save-method works with
every
case except when I set the recurrence to smething like the 2:nd Thursday
of
every month.
How can I, using CDO, set a positive or negative value in the
BYDAY-property. Should I really have to edit the RRule directly?
/Mathias
"Glen Scales [MVP]" wrote:
I think your RRule is a little ambiguous (actually that whole RFC can be
a
bit that way) but when you using BYSETPOS in a monthly rule (they way
outlook understands and uses it) your saying this appointment is going
to
happen on that particular day of the month. EG in your rule your saying
the
2nd of the month. The ambiguous part is when you also use the BYDAY=TH
part
so your saying the meeting occurs everymonth on the second only if its a
Thursday ? If you wanted it to occur on the 2nd of every month your
RRule
should look like FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYDAY=SU, MO, TU, WE,
TH,
FR, SA;BYSETPOS=2;WKST=SU . Now if you want the meeting to occur on the
2nd
Thursday of the month then what OWA is doing is in line with what the
RFC
states ref http://www.ietf.org/rfc/rfc2445.txt
" The BYDAY rule part specifies a COMMA character (US-ASCII decimal 44)
separated list of days of the week; MO indicates Monday; TU indicates
Tuesday; WE indicates Wednesday; TH indicates Thursday; FR indicates
Friday; SA indicates Saturday; SU indicates Sunday.
Each BYDAY value can also be preceded by a positive (+n) or negative
(-n) integer. If present, this indicates the nth occurrence of the
specific day within the MONTHLY or YEARLY RRULE. For example, within
a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday
within the month, whereas -1MO represents the last Monday of the
month. If an integer modifier is not present, it means all days of
this type within the specified frequency. For example, within a
MONTHLY rule, MO represents all Mondays within the month."
I think it all comes down to how that particular vendor implements this
RFC
but I believe that's the way it works for OWA and Outlook its possible
that
this may work differently on say Apple iCal.
Cheers
Glen
"Mathias Erlandsson" <MathiasErlandsson@discussions.microsoft.com> wrote
in
message news:659A1B86-8307-4F68-A302-BECD6EC76B0A@microsoft.com...
I'v created a recurring appointment with cdo and when I open it in owa
and
select view the entire series I get the following message.
Recurrence: Unable to determine the recurrence pattern.
The problem is that the property urn:schemas:calendar:rrule doesn't
look
the
same as when I create the same reccurence in owa. With my code I get
FREQ=MONTHLY;COUNT=10;WKST=MO;INTERVAL=1;BYSETPOS=2;BYDAY=TH
and with owa
FREQ=MONTHLY;COUNT=10;WKST=SU;INTERVAL=1;BYDAY=2TH
How did owa get the number 2 in the BYDAY field? If i manually set
this
with
my generated appointment, everything looks ok in owa.
I'm using VS .NET 2003 ASP .NET with C# as language
This is how I'm saving the recurrence:
CDO.IRecurrencePattern iRPatter = iRPatters.Add("Add");
iRPatter.Frequency = CDO.CdoFrequency.cdoMonthly;
iRPatter.ByPosition.Add( 2 );
iRPatter.DaysOfWeek.Add( (int)CDO.CdoDayOfWeek.cdoThursday);
iRPatter.Instances = Convert.ToInt32(
lblRecur_endOccurrences.Value.Trim() );
|
|
|
| Back to top |
|
 |
Mathias Erlandsson
Guest
|
Posted:
Thu Nov 25, 2004 1:35 pm Post subject:
Re: Create recurring appointment with cdo |
|
|
It works now!!
Thanks for your help.
/Mathias
"Glen Scales [MVP]" wrote:
| Quote: | What you need to do is instead of using .DaysOfWeek you need to use
..Weekdays . These both set the same element in the RRule the difference is
that .DaysOfWeek is a integers collection with only one dimension (which
contains the CdoDayOfWeek enum). .DaysOfWeek is a two dimensional integers
collection the first dimension contains an integer for the week of the month
(in your case this would be 2) and the second dimension contains the
CdoDayOfWeek enum.
Something like this works in VBS
Weekdays.add(array(2,4))
Cheers
Glen
"Mathias Erlandsson" <MathiasErlandsson@discussions.microsoft.com> wrote in
message news:8DCF5D75-FA91-439D-BCD1-AB73A098CD07@microsoft.com...
Thanks for the reply.
Since I'm using CDO to create the appointment, I don't get to set the
RRule-property manually. The question is how do I use CDO to create a
recurring appointment that owa understands. My save-method works with
every
case except when I set the recurrence to smething like the 2:nd Thursday
of
every month.
How can I, using CDO, set a positive or negative value in the
BYDAY-property. Should I really have to edit the RRule directly?
/Mathias
"Glen Scales [MVP]" wrote:
I think your RRule is a little ambiguous (actually that whole RFC can be
a
bit that way) but when you using BYSETPOS in a monthly rule (they way
outlook understands and uses it) your saying this appointment is going
to
happen on that particular day of the month. EG in your rule your saying
the
2nd of the month. The ambiguous part is when you also use the BYDAY=TH
part
so your saying the meeting occurs everymonth on the second only if its a
Thursday ? If you wanted it to occur on the 2nd of every month your
RRule
should look like FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYDAY=SU, MO, TU, WE,
TH,
FR, SA;BYSETPOS=2;WKST=SU . Now if you want the meeting to occur on the
2nd
Thursday of the month then what OWA is doing is in line with what the
RFC
states ref http://www.ietf.org/rfc/rfc2445.txt
" The BYDAY rule part specifies a COMMA character (US-ASCII decimal 44)
separated list of days of the week; MO indicates Monday; TU indicates
Tuesday; WE indicates Wednesday; TH indicates Thursday; FR indicates
Friday; SA indicates Saturday; SU indicates Sunday.
Each BYDAY value can also be preceded by a positive (+n) or negative
(-n) integer. If present, this indicates the nth occurrence of the
specific day within the MONTHLY or YEARLY RRULE. For example, within
a MONTHLY rule, +1MO (or simply 1MO) represents the first Monday
within the month, whereas -1MO represents the last Monday of the
month. If an integer modifier is not present, it means all days of
this type within the specified frequency. For example, within a
MONTHLY rule, MO represents all Mondays within the month."
I think it all comes down to how that particular vendor implements this
RFC
but I believe that's the way it works for OWA and Outlook its possible
that
this may work differently on say Apple iCal.
Cheers
Glen
"Mathias Erlandsson" <MathiasErlandsson@discussions.microsoft.com> wrote
in
message news:659A1B86-8307-4F68-A302-BECD6EC76B0A@microsoft.com...
I'v created a recurring appointment with cdo and when I open it in owa
and
select view the entire series I get the following message.
Recurrence: Unable to determine the recurrence pattern.
The problem is that the property urn:schemas:calendar:rrule doesn't
look
the
same as when I create the same reccurence in owa. With my code I get
FREQ=MONTHLY;COUNT=10;WKST=MO;INTERVAL=1;BYSETPOS=2;BYDAY=TH
and with owa
FREQ=MONTHLY;COUNT=10;WKST=SU;INTERVAL=1;BYDAY=2TH
How did owa get the number 2 in the BYDAY field? If i manually set
this
with
my generated appointment, everything looks ok in owa.
I'm using VS .NET 2003 ASP .NET with C# as language
This is how I'm saving the recurrence:
CDO.IRecurrencePattern iRPatter = iRPatters.Add("Add");
iRPatter.Frequency = CDO.CdoFrequency.cdoMonthly;
iRPatter.ByPosition.Add( 2 );
iRPatter.DaysOfWeek.Add( (int)CDO.CdoDayOfWeek.cdoThursday);
iRPatter.Instances = Convert.ToInt32(
lblRecur_endOccurrences.Value.Trim() );
|
|
|
| Back to top |
|
 |
|
|
|
|