Appointment Question

  • Thread starter Thread starter Darren Kennedy
  • Start date Start date
D

Darren Kennedy

When setting up recurrence event by hand in outlook I
chose to set a daily appointment that occurs every 1 days
starts today (Dec 22, 2003) and ends (Jan 1, 2004).

Outlook automatically fills in the occurences to be 11. My
problem is that I'm syncing calendar items up to a webmail
calendar app and I need to be able to obtain the info as
to whether that recurrence info was entered via EndDate
(ie. Jan 1,04) or by number of occurences (11) so as to
represent it properly within the webmail interface.

I know that Outlook keeps this information somewhere as
when I reopen that recurrence the radio button correctly
displays the fact that this event is by EndDate.

However programmatically if I check Occurences or End Date
they both give valid data. So how do I know which is the
way the user entered it???

Thanks,

Darren
 
Look at the Object Browser help example for DayOfWeekMask. It shows
part of what you have to do. It also mentions some of the other
properties you have to look at, such as RecurrenceType and Interval.
Check the Object Browser help for examples for all the
RecurrencePattern properties to see how to do what you want.
 
As I'm not running VB is there anyway you can point me to
somewhere that would have that documentation online? The
VB help will still aid me in my C++ development,
unfortunately I just don't have the VB documentation
anywhere.

DK
 
You can call up the Object Browser from the Outlook VBA project.
Alt+F11 to open that up. Select the Object Browser and away you go.
 
Sorry if I'm overly naive here. But if I'm not running a
VB dev tool, how do I open a VBA project? And where do I
get this VBA project which I'm supposed to open in the
first place?

Darren
 
It's built into Outlook, you don't need VB installed. Just press
Alt+F11 in Outlook to open it up.
 
Thanks Ken,

Well now that I finally got to this stuff, I realized it's
the same as the documentation I found on MSDN online.
Unfortunately my original question is not answered by the
documentation here.

I'm using the recurrence objects quite thoroughly and am
fairly fluent in their properties and methods. However I
do not see anywhere that Outlook exposes how the user
entered the termination point. (ie via PatternEndDate or
Occurences).

Both values are always valid and there doesn't seem t obe
a way that Ican see to deduce which method the user used
to input them.

Any idea?

Darren
 
There is (or was) an article in TechNet about Exchange 5.5 migration (migration to Exchange 5.5) that has some nice tables that fit all the properties together and what applies to what. I'll try to paste the tables from that article into this post, they may not format very well though.

You more or less have to use a logic tree to examine various properties to get the type of recurrence and then from there interpret the other properties.

The following table describes the properties shared by recurring appointments, events, and tasks.

Property
Values
Description

DayInterval
1 through 999
Number of days between instances. Used only if RecurringType is 64.

DayOfMonthMask
1st day of month = bit 0

31st day of month = bit 30
Bit field indicating which days of the month are valid for recurrence pattern. Used only if RecurringType is 7 or 12.

DayOfWeekMask
Sunday = bit 0

Saturday = bit 6
Bit field indicating which days of the week are valid for recurrence pattern. Used only if RecurringType is 48, 51, or 56.

DayOfWeekStart
0 through 6

Sunday = 0
Start of week preference. Used only if RecurringType is 48. For recalculating biweekly meetings.

EndRecurringDate
mm-dd-yyyy
End date for recurrence pattern.

EndRecurringTime (Required)
hh:mm
End time for a recurring item.

Exceptions
See "Exceptions Property" section later in this chapter.
Exceptions to a recurring item.

FirstRecurringAlarmDate
Today's date in mm-dd-yyyy format.
First recurring item with alarm. Recalculated during import into Microsoft Outlook.

MonthInterval
1 through 99
Interval between months for recurrence pattern. Used only if RecurringType is 12 or 56.

MonthOfYearMask
January = bit 0

December = bit 11
Bit field indicating which months of year are valid for recurrence pattern. Used only if RecurringType is 7 or 51.

RecurringType (Required)
7 = Yearly on specific day

12 = Monthly on specific day

48 = Weekly

51 = Yearly on a pattern

56 = Monthly on a pattern

64 = Daily
Type of recurrence pattern.

StartRecurringDate (Required)
mm-dd-yyyy
Start date for recurrence pattern.

StartRecurringTime (Required)
hh:mm
Start time for recurring item.

WeekInterval
Positive integer
Interval between weeks for recurrence pattern. Used only if RecurringType is 48, 51, or 56.

YearInterval
Positive integer
Interval between years for recurrence pattern. Used only if RecurringType is 7.






The following table describes additional values required for the RecurringType property.

RecurringType
Required values

7 = Yearly on specific day
DayOfMonthMask, MonthOfYearMask, YearInterval

12 = Monthly on specific day
DayOfMonthMask, MonthInterval

48 = Weekly
DayOfWeekMask, DayOfWeekStart, WeekInterval

51 = Yearly on a pattern
DayOfWeekMask, MonthOfYearMask, WeekInterval

56 = Monthly on a pattern
DayOfWeekMask, MonthInterval, WeekInterval

64 = Daily
DayInterval




Exceptions Property Exceptions are deleted or modified properties of a recurring appointment or task. To delete, only two properties are required: Deleted and InstanceDate. To modify, the appointment or task must be redefined as a single appointment or task, and you must redefine the StartDate and EndDate, even if only the Location property is modified.



Property
Values
Description

Deleted
T or F
If instance was marked "deleted." If FALSE, instance has been modified.

InstanceDate
mm-dd-yyyy
Date that original instance would have occurred.
 
Ken,

I do thank you for your efforts, but again not what I am
asking. I'll try one last time.

I do already know how to interpet all the various
recurring appointment events and their attributes. I also
have spent numerous hours figuring out many of their
little nuances. I'm familiar with the table that you
copied in as well.

But again my question is NOT in regards to that but a very
specific problem. As I said before ...and I'll say this as
explicitly and in as much detail as possible... my problem
is as follows:

Within the UI interface titled 'Appointment Recurrence' of
Outlook 2000 or 2002 there are 3 radio buttons titled:
1. 'No end date'
2. 'End after: ## occurrences'
3. 'End by: #some date#'

The use selects for instance a daily event that begins on
Jan 1. S/he then chooses to make it for 'End after 10
occurences' (ie. radio button 2).

So pausing for a moment, what I need to know later on when
I view the properties of this appointment via code is that
the user selected radio button 2 ('End after: ##
occurences') and not radio button 3 ('End by: #some
date#').

Back to the user, who now clicks 'OK'. Outlook
automatically saves the recurrence including the Occurence
property AND the PatternEndDate property which it fills in
to be 9 days after start date (End date - Start Date + 1 =
10). In this way the corresponding data from radio button
2 and 3 are updated.

So as you can see now both PatternEndDate AND Occurences
are valid and there's nowhere that I can find to check to
see in which way the user input the data. Thus it seems to
be impossible to determine (at least with the data
exposed) if it was input via method 2) or 3). This
information is very important to me. It is also stored
somewhere in outlook as when I go back to the Appointment
Recurrence screen in outlook it correctly selects radio
button 2 ('End after ## occurences') to turn on. So the
info is there somewhere.

So again, do you have any idea how I might determine the
method in which the user input the data?

Thanks for all your time,

Darren
 
That information is stored in an undocumented binary blob in the
Outlook item itself. Unfortunately even MS doesn't have its own
documentation on that blob. When the owner of CDO at MS, who's a
friend of mine, wants to decode certain things in the blob he has to
reverse engineer things himself.

The best I can do is point to the MAPI-L list archives for some work
that Dan Mitchell did with recurring items. He managed to decode a lot
of the binary blob fields. I've done some more with that working with
Dan, but not with the exact thing you are interested in. The meanings
of various fields in the blob change depending on various settings so
there's nothing cut and dried to point you to other than Dan's work.
And as I said, MS itself has lost all that documentation so much of it
isn't even available internally any more.
 
Thanks Ken,

that is precisely the information I needed. Looks like I
may have to look at getting by without that info.

Darren
 
If you have a copy of OutlookSpy you can use that to reverse engineer
what you want. I've done that with parts of the binary blob. What
documentation there is on it is under Schedule+ information in the
MDSN library. Using that as a the basis for the investigation and
playing with the recurrence settings to see how the blob changes could
be done. It depends on how much you need to have that data. OutlookSpy
is at www.dimastr.com
 
Back
Top