PC Review


Reply
Thread Tools Rate Thread

Appointment/ task - recurrence - range of recurrence

 
 
semut
Guest
Posts: n/a
 
      25th Jul 2005
Hello,

I notice that Outlook will automatically calculate both

- Occurrences (integer)
- PatternEndDate (Date)


Even if I only select either one of it, say I select "End After" radio
button or "End By" radio button.

It is logic that both are calculatable even I have keyed in one of them.

The problem now is that how could I know what was the user selection?

Is the user select "End After" or "End By"?

Is there any field/properties in MAPI/CDO/OOM that I could tell what is the
selection?


thanks in advance.


 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      25th Jul 2005
In both cases mentioned in your posts there is no way to know what the user
has selected in the recurrence settings dialog. All you have to go on is the
actual recurrence pattern properties that are created.

--
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


"semut" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I notice that Outlook will automatically calculate both
>
> - Occurrences (integer)
> - PatternEndDate (Date)
>
>
> Even if I only select either one of it, say I select "End After" radio
> button or "End By" radio button.
>
> It is logic that both are calculatable even I have keyed in one of them.
>
> The problem now is that how could I know what was the user selection?
>
> Is the user select "End After" or "End By"?
>
> Is there any field/properties in MAPI/CDO/OOM that I could tell what is
> the selection?
>
>
> thanks in advance.
>
>


 
Reply With Quote
 
semut
Guest
Posts: n/a
 
      26th Jul 2005
Yes, that is what I have done, I am refering the RecurrencePattern object I
obtained throught the GetRecurrencePattern (The only way to get the
reccurence properties of an appointment item or task item) is through the
GetRecurrencePattern in OOM. Unless there are other method to go?

E.g.
Dim myRecurrPatt As Outlook.RecurrencePattern
'myAppItem is the item that I have keyed in into Outlook calendar
Set myRecurrPatt = myApptItem.GetRecurrencePattern


The 2 problems are actually refering the RecurrencePattern object that I
obtained

1. Outlook will automatically calculate both

- Occurrences (integer)
- PatternEndDate (Date)

Even if I have selected only one of it, say I select "End After XXXX
Occurrence" radio
button or "End By DD/MM/YYYY" radio button.

That means the Occurences and PatternEndDate field of "myRecurrPatt " will
always be filled up (unless the NoEndDate = true but not in this case as I
am not selecting No End Date).

I can't seems to be able to find other field to differentiate what was the
initial user choice (was user selected End After XXX occurrence / End By
MM/DD/YYYY?)



2.If i set my Task Item to be recurring Weekly - Regenerate 1 New task in
my Outlook 2003 task. When I use OOM to read the Task item, like

When I call

Set myRecurrPatt = myTaskItem.GetRecurrencePattern

if myRecurrPatt.RecurrenceType = olRecursWeekly Then
MsgBox "Nope, this wasn't called??"
end if

if myRecurrPatt.RecurrenceType = olRecursDaily Then
MsgBox "Yes, this was called?? Huh???"
end if

It has become RecursDaily and not olRecursWeekly which this will clash with
the case whereby user'task item is really recurring in olRecursDaily and
Regenerate 1 New task.

I have check through other combinations (recurrence pattern). All working
as mentioned in the Office VBA help files so far but left out these two odds
which giving me headache. Anyone encounter this before? Or these are again
another issues that require workaround like some other OOM functions?

Need pointers from gurus.

thanks in advance.







"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> In both cases mentioned in your posts there is no way to know what the
> user has selected in the recurrence settings dialog. All you have to go on
> is the actual recurrence pattern properties that are created.
>
> --
> 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
>
>
> "semut" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hello,
>>
>> I notice that Outlook will automatically calculate both
>>
>> - Occurrences (integer)
>> - PatternEndDate (Date)
>>
>>
>> Even if I only select either one of it, say I select "End After" radio
>> button or "End By" radio button.
>>
>> It is logic that both are calculatable even I have keyed in one of them.
>>
>> The problem now is that how could I know what was the user selection?
>>
>> Is the user select "End After" or "End By"?
>>
>> Is there any field/properties in MAPI/CDO/OOM that I could tell what is
>> the selection?
>>
>>
>> thanks in advance.
>>
>>

>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      26th Jul 2005
The only way to get the recurrence pattern is by GetRecurrencePattern. You
could read the recurrence pattern using MAPI to get the binary property, but
that buys you nothing and you won't have the recurrence properties at all,
you'd have to decode the binary.

As I said, there is nothing to get other than the pattern that was saved.
You have to use what's provided to you. The combination of all the pattern
properties lets you distinguish the complete pattern but not necessarily the
way the user created the pattern in the dialog.

--
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


"semut" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Yes, that is what I have done, I am refering the RecurrencePattern object
> I obtained throught the GetRecurrencePattern (The only way to get the
> reccurence properties of an appointment item or task item) is through the
> GetRecurrencePattern in OOM. Unless there are other method to go?
>
> E.g.
> Dim myRecurrPatt As Outlook.RecurrencePattern
> 'myAppItem is the item that I have keyed in into Outlook calendar
> Set myRecurrPatt = myApptItem.GetRecurrencePattern
>
>
> The 2 problems are actually refering the RecurrencePattern object that I
> obtained
>
> 1. Outlook will automatically calculate both
>
> - Occurrences (integer)
> - PatternEndDate (Date)
>
> Even if I have selected only one of it, say I select "End After XXXX
> Occurrence" radio
> button or "End By DD/MM/YYYY" radio button.
>
> That means the Occurences and PatternEndDate field of "myRecurrPatt "
> will always be filled up (unless the NoEndDate = true but not in this case
> as I am not selecting No End Date).
>
> I can't seems to be able to find other field to differentiate what was the
> initial user choice (was user selected End After XXX occurrence / End By
> MM/DD/YYYY?)
>
>
>
> 2.If i set my Task Item to be recurring Weekly - Regenerate 1 New task in
> my Outlook 2003 task. When I use OOM to read the Task item, like
>
> When I call
>
> Set myRecurrPatt = myTaskItem.GetRecurrencePattern
>
> if myRecurrPatt.RecurrenceType = olRecursWeekly Then
> MsgBox "Nope, this wasn't called??"
> end if
>
> if myRecurrPatt.RecurrenceType = olRecursDaily Then
> MsgBox "Yes, this was called?? Huh???"
> end if
>
> It has become RecursDaily and not olRecursWeekly which this will clash
> with the case whereby user'task item is really recurring in olRecursDaily
> and Regenerate 1 New task.
>
> I have check through other combinations (recurrence pattern). All working
> as mentioned in the Office VBA help files so far but left out these two
> odds which giving me headache. Anyone encounter this before? Or these are
> again another issues that require workaround like some other OOM
> functions?
>
> Need pointers from gurus.
>
> thanks in advance.


 
Reply With Quote
 
Dan Mitchell
Guest
Posts: n/a
 
      26th Jul 2005
"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in
news:##(E-Mail Removed):
> You could read the recurrence pattern using MAPI to get the binary
> property, but that buys you nothing and you won't have the recurrence
> properties at all, you'd have to decode the binary.


If you (the OP, not Ken) really have to know which sort of end type the
recurrence has, see

http://www.geocities.com/cainrandom/...ecurrence.html

which has that info halfway down; it's 22 bytes in, 0x21 for end-on-date,
0x22 for end-after-number-of-instances, 0x23 for never-ends. Oh, and it's
actually 22 plus some more bytes for offsets depending on the type of
recurrence. See that page for more.

-- dan
 
Reply With Quote
 
semut
Guest
Posts: n/a
 
      27th Jul 2005
thanks

"Dan Mitchell" <(E-Mail Removed)> wrote in message
news:Xns969F615D463BCdjmitchellayahoocom@207.46.248.16...
> "Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in
> news:##(E-Mail Removed):
>> You could read the recurrence pattern using MAPI to get the binary
>> property, but that buys you nothing and you won't have the recurrence
>> properties at all, you'd have to decode the binary.

>
> If you (the OP, not Ken) really have to know which sort of end type the
> recurrence has, see
>
> http://www.geocities.com/cainrandom/...ecurrence.html
>
> which has that info halfway down; it's 22 bytes in, 0x21 for end-on-date,
> 0x22 for end-after-number-of-instances, 0x23 for never-ends. Oh, and it's
> actually 22 plus some more bytes for offsets depending on the type of
> recurrence. See that page for more.
>
> -- dan



 
Reply With Quote
 
semut
Guest
Posts: n/a
 
      27th Jul 2005
thanks

"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> The only way to get the recurrence pattern is by GetRecurrencePattern. You
> could read the recurrence pattern using MAPI to get the binary property,
> but that buys you nothing and you won't have the recurrence properties at
> all, you'd have to decode the binary.
>
> As I said, there is nothing to get other than the pattern that was saved.
> You have to use what's provided to you. The combination of all the pattern
> properties lets you distinguish the complete pattern but not necessarily
> the way the user created the pattern in the dialog.
>
> --
> 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
>
>
> "semut" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Yes, that is what I have done, I am refering the RecurrencePattern
>> object I obtained throught the GetRecurrencePattern (The only way to get
>> the reccurence properties of an appointment item or task item) is through
>> the GetRecurrencePattern in OOM. Unless there are other method to go?
>>
>> E.g.
>> Dim myRecurrPatt As Outlook.RecurrencePattern
>> 'myAppItem is the item that I have keyed in into Outlook calendar
>> Set myRecurrPatt = myApptItem.GetRecurrencePattern
>>
>>
>> The 2 problems are actually refering the RecurrencePattern object that I
>> obtained
>>
>> 1. Outlook will automatically calculate both
>>
>> - Occurrences (integer)
>> - PatternEndDate (Date)
>>
>> Even if I have selected only one of it, say I select "End After XXXX
>> Occurrence" radio
>> button or "End By DD/MM/YYYY" radio button.
>>
>> That means the Occurences and PatternEndDate field of "myRecurrPatt "
>> will always be filled up (unless the NoEndDate = true but not in this
>> case as I am not selecting No End Date).
>>
>> I can't seems to be able to find other field to differentiate what was
>> the initial user choice (was user selected End After XXX occurrence / End
>> By MM/DD/YYYY?)
>>
>>
>>
>> 2.If i set my Task Item to be recurring Weekly - Regenerate 1 New task
>> in my Outlook 2003 task. When I use OOM to read the Task item, like
>>
>> When I call
>>
>> Set myRecurrPatt = myTaskItem.GetRecurrencePattern
>>
>> if myRecurrPatt.RecurrenceType = olRecursWeekly Then
>> MsgBox "Nope, this wasn't called??"
>> end if
>>
>> if myRecurrPatt.RecurrenceType = olRecursDaily Then
>> MsgBox "Yes, this was called?? Huh???"
>> end if
>>
>> It has become RecursDaily and not olRecursWeekly which this will clash
>> with the case whereby user'task item is really recurring in olRecursDaily
>> and Regenerate 1 New task.
>>
>> I have check through other combinations (recurrence pattern). All
>> working as mentioned in the Office VBA help files so far but left out
>> these two odds which giving me headache. Anyone encounter this before?
>> Or these are again another issues that require workaround like some other
>> OOM functions?
>>
>> Need pointers from gurus.
>>
>> thanks in advance.

>



 
Reply With Quote
 
semut
Guest
Posts: n/a
 
      27th Jul 2005
I have checked out the article.
that is a really good reference for MAPI recurrence pattern by the way.

thanks a bunch


"Dan Mitchell" <(E-Mail Removed)> wrote in message
news:Xns969F615D463BCdjmitchellayahoocom@207.46.248.16...
> "Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in
> news:##(E-Mail Removed):
>> You could read the recurrence pattern using MAPI to get the binary
>> property, but that buys you nothing and you won't have the recurrence
>> properties at all, you'd have to decode the binary.

>
> If you (the OP, not Ken) really have to know which sort of end type the
> recurrence has, see
>
> http://www.geocities.com/cainrandom/...ecurrence.html
>
> which has that info halfway down; it's 22 bytes in, 0x21 for end-on-date,
> 0x22 for end-after-number-of-instances, 0x23 for never-ends. Oh, and it's
> actually 22 plus some more bytes for offsets depending on the type of
> recurrence. See that page for more.
>
> -- dan



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Recurrence is gray out - how do I stop Recurrence? =?Utf-8?B?bWFydHk=?= Microsoft Outlook Calendar 1 27th Apr 2007 01:24 PM
Appointment Recurrence: "No End Date" button in range of recurrenc =?Utf-8?B?TUw=?= Microsoft Outlook Calendar 6 24th Aug 2005 12:55 PM
Appointment Recurrence Evelyn Microsoft Outlook Calendar 2 19th May 2004 12:51 AM
How to identify the modification of whole recurrence series, when the recurrence pattern contains exceptions Maya Microsoft Outlook Calendar 0 13th Apr 2004 01:28 AM
Appointment Recurrence egioka Microsoft Outlook Calendar 1 13th Oct 2003 09:13 PM


Features
 

Advertising
 

Newsgroups
 


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