HOWTO- manage multiple sessions in Outlook Calendar

HOWTO- manage multiple sessions in Outlook Calendar

Post by Denni » Wed, 19 Mar 2003 05:40:03



We have a C++ application that manages classes, and we
want the class sessions to populate the student's Outlook
Calendar.  (Class sessions can be like M-F-F at a certain
time, or T-TH, or just about any combination.)  Also, if a
class is cancelled, or the meeting time changes, we wwant
our software to automatically correct the Calendar.

Originally, we were going to use iCalendar/vCalendar, but
apparently Outlook only looks at the first session in a
vCalendar file that contains multiple events.  

My question is: assuming this can be done, which
technology is the recommended approach?  Here is what I
*think* I know about.
1) CDO 1.21 - not thread-safe, and limited documentation
for Calendars.  This does not appear to be a robust
approach.
2) Outlook Object Model: Appears to be the easiest to use,
but our application is a multi-threaded service, and I'm
not sure this is a good approach.
3) CDO Windows 2000 - apparently has no support for
Calendars.
4) CDO for Exchange - has support for calendars, but apps
need to run on the Exchange machine, which is not
practical.
5) Extended MAPI - Steep learning curve.  I would probably
need to hire a consultant.  Also, I'm getting the
impression that Exchange is moving away from MAPI and
moving toward internet standards.  

Thanks for any assistance.

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Jason Johnston [M » Sat, 22 Mar 2003 23:42:12


Have you considered making these meetings and sending your students meeting
requests instead of directly manipulating their calendars?  That would cut
the complexity considerably and make this a relatively simple task with CDO
1.21.

Jason Johnston
Microsoft Developer Support - Messaging

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Denni » Sun, 23 Mar 2003 10:15:54


That would also be fine.  However, it is not very clear
how to handle this with CDO 1.21.  As near as I can tell
Outlook/Exchange's "recurrence" feature is the closest
thing to our concept of "multiple  sessions".

Let's say I have a class with session 1 Monday 10:00 AM,
session 2, Wednesday at 10:00 AM, and a lab Friday at
12:00 - 2:00 PM.

1) Can one meeting request handle this so that all
3 "events" appear on the recipients calendar?
2) If so, and I later need to re-schedule everything for
an hour later, what is the general technique for a CDO app
to Update people's Calendars?  

Thanks in Advance.

Quote:>-----Original Message-----
>Have you considered making these meetings and sending

your students meeting
Quote:>requests instead of directly manipulating their

calendars?  That would cut
Quote:>the complexity considerably and make this a relatively

simple task with CDO
Quote:>1.21.

>Jason Johnston
>Microsoft Developer Support - Messaging

>This posting is provided "AS IS" with no warranties, and
confers no rights.

>.

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Daniel Mitchell [MVP » Wed, 26 Mar 2003 16:51:41




Quote:> That would also be fine.  However, it is not very clear
> how to handle this with CDO 1.21.  As near as I can tell
> Outlook/Exchange's "recurrence" feature is the closest
> thing to our concept of "multiple  sessions".

> Let's say I have a class with session 1 Monday 10:00 AM,
> session 2, Wednesday at 10:00 AM, and a lab Friday at
> 12:00 - 2:00 PM.

 Nothing in Outlook has any concept of that, at least not easily. Recurring
meetings have to have a pattern -- you can change the individual instances
of that meeting after the fact, but you'd have to change every one every
time. The easiest way to do the one above would be to have three separate
weekly meetings, tying them all together isn't something Outlook (or CDO)
has any way to do.

Quote:> 1) Can one meeting request handle this so that all
> 3 "events" appear on the recipients calendar?

 In other words, no.

Quote:> 2) If so, and I later need to re-schedule everything for
> an hour later, what is the general technique for a CDO app
> to Update people's Calendars?  

 Basically the same as in Outlook -- find the appointment, change it, send
out updates to all the recipients. The only gotcha is that if you want to
change one instance, you have to set up a filter on the calendar to search
only on the date for that instance, then you'll find the particular
instance and everything works. If you just loop over everything in the
calendar without a date restriction, you find the base pattern, so you
update every instance.

 -- dan

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Denni » Sat, 29 Mar 2003 11:39:58


Dan,

I appreciate the help, but I didn't quite get your last
paragraph.  I'm not quite sure what you mean by "base
pattern".  Are you referring to Outlook's recurrence
feature here (which apparently I can't use, anyway), or
the "3 separate meetings" that you described in your first
paragraph?

Also, can I assume that by "3 separate meetings" you mean
that I should create 3 separate meeting requests for each
of my "sessions", and essentially "tie them together" in
my own application, rather than relying on anything in
Outlook/Exchange to manage the "tying"?

When I first looked at trying to do this 3-4 years ago, I
had the impression that every meeting request created
something like a GUID in the MAPI store.  My thought was
that I would store this GUID in my database, and
subsequently use it to rapidly find records that I needed
to update, rather than filter on date,time,etc, which
seemed like it would be slow.  I never got around to
testing this back then, since the project was put on hold
until now, but does this make any sense?

Thanks again,
-Dennis

>-----Original Message-----

$95a6e140

>> That would also be fine.  However, it is not very clear
>> how to handle this with CDO 1.21.  As near as I can
tell
>> Outlook/Exchange's "recurrence" feature is the closest
>> thing to our concept of "multiple  sessions".

>> Let's say I have a class with session 1 Monday 10:00
AM,
>> session 2, Wednesday at 10:00 AM, and a lab Friday at
>> 12:00 - 2:00 PM.

> Nothing in Outlook has any concept of that, at least not
easily. Recurring
>meetings have to have a pattern -- you can change the

individual instances
Quote:>of that meeting after the fact, but you'd have to change
every one every
>time. The easiest way to do the one above would be to

have three separate

- Show quoted text -

Quote:>weekly meetings, tying them all together isn't something
Outlook (or CDO)
>has any way to do.

>> 1) Can one meeting request handle this so that all
>> 3 "events" appear on the recipients calendar?

> In other words, no.

>> 2) If so, and I later need to re-schedule everything
for
>> an hour later, what is the general technique for a CDO
app
>> to Update people's Calendars?  

> Basically the same as in Outlook -- find the

appointment, change it, send
Quote:>out updates to all the recipients. The only gotcha is

that if you want to

- Show quoted text -

Quote:>change one instance, you have to set up a filter on the
calendar to search
>only on the date for that instance, then you'll find the
particular
>instance and everything works. If you just loop over
everything in the
>calendar without a date restriction, you find the base
pattern, so you
>update every instance.

> -- dan
>.

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Daniel Mitchell [MVP » Sun, 30 Mar 2003 04:59:43




Quote:> I appreciate the help, but I didn't quite get your last
> paragraph.  I'm not quite sure what you mean by "base
> pattern".  Are you referring to Outlook's recurrence
> feature here (which apparently I can't use, anyway), or
> the "3 separate meetings" that you described in your first
> paragraph?

 There's two things here:

 1. Say you have a meeting "every wednesday 9-10am". If you change the
'base' meeting to 10-11am, then every instance of the meeting will be
changed to 10-11am.

 2. Same meeting, but you change the instance on the 2nd april to 10-11am.
Now only that one starts at 10, all the other ones are still at 9am.

Quote:> Also, can I assume that by "3 separate meetings" you mean
> that I should create 3 separate meeting requests for each
> of my "sessions", and essentially "tie them together" in
> my own application, rather than relying on anything in
> Outlook/Exchange to manage the "tying"?

 If you want to have meetings that don't match the patterns available in
Outlook's recurrence dialog, then you have to do this. Every X days is
fine, but mon+tue+fri isn't possible, you'd have to have three separate
weekly meetings and keep track of the connection yourself, yes.

Quote:> When I first looked at trying to do this 3-4 years ago, I
> had the impression that every meeting request created
> something like a GUID in the MAPI store.  My thought was
> that I would store this GUID in my database, and
> subsequently use it to rapidly find records that I needed
> to update, rather than filter on date,time,etc, which
> seemed like it would be slow.  I never got around to
> testing this back then, since the project was put on hold
> until now, but does this make any sense?

 Yup, every message has an ENTRYID, and you can use this. Individual
instances of recurring meetings don't "exist" until you find them, though,
and even then they only exist as attachments. In other words, there's no
way to say "get me the instance of this meeting for 29th March 2123" by
ENTRYID, firstly because it's not there yet (or otherwise if you had a
recurrence that never ended, it'd have to create an infinite number of
messages in the store for each instance), and secondly because even when it
is, it doesn't have an ENTRYID as such.

 Also, the only way to change instances of recurring meetings is to search
by date, CDO doesn't support doing it any other way. You could do it all by
hand in raw ExMAPI/low-level CDO, but that's a _big_ pain. See many past
posts here (author 'fbs' for lots of stuff he's been going through) for
more evidence of that.

 -- dan

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Denni » Wed, 09 Apr 2003 08:36:46


Thanks, Dan.

To summarize:
1) CDO 1.21 appears to be the best approach for this.
2) Forget about using recurring meetings -- use individual
meeting requests and keep track of the separate instances
in my app.

Hopefully this will be close to the end of my questions,
but in the M-T-F example, does this mean that I need to
send out 3 separate meeting requests both when a meeting
is initially scheduled and when anything changes?  (Some
of my customers may have a class that is scheduled with 50
sessions, so this could get timeconsuming.)  Can this be
avoided or minimized by using CDO to manipulate the
calendar directly?

Also, if I decide to pursue a consultant for this, is it
bad etiquette to post for such in this newsgroup?

Thanks,
-Dennis

>-----Original Message-----

$531c8510

>> I appreciate the help, but I didn't quite get your last
>> paragraph.  I'm not quite sure what you mean by "base
>> pattern".  Are you referring to Outlook's recurrence
>> feature here (which apparently I can't use, anyway), or
>> the "3 separate meetings" that you described in your
first
>> paragraph?

> There's two things here:

> 1. Say you have a meeting "every wednesday 9-10am". If
you change the
>'base' meeting to 10-11am, then every instance of the
meeting will be
>changed to 10-11am.

> 2. Same meeting, but you change the instance on the 2nd
april to 10-11am.
>Now only that one starts at 10, all the other ones are
still at 9am.

>> Also, can I assume that by "3 separate meetings" you
mean
>> that I should create 3 separate meeting requests for
each
>> of my "sessions", and essentially "tie them together"
in
>> my own application, rather than relying on anything in
>> Outlook/Exchange to manage the "tying"?

> If you want to have meetings that don't match the

patterns available in

- Show quoted text -

Quote:>Outlook's recurrence dialog, then you have to do this.
Every X days is
>fine, but mon+tue+fri isn't possible, you'd have to have
three separate
>weekly meetings and keep track of the connection
yourself, yes.

>> When I first looked at trying to do this 3-4 years ago,
I
>> had the impression that every meeting request created
>> something like a GUID in the MAPI store.  My thought
was
>> that I would store this GUID in my database, and
>> subsequently use it to rapidly find records that I
needed
>> to update, rather than filter on date,time,etc, which
>> seemed like it would be slow.  I never got around to
>> testing this back then, since the project was put on
hold
>> until now, but does this make any sense?

> Yup, every message has an ENTRYID, and you can use this.
Individual
>instances of recurring meetings don't "exist" until you
find them, though,
>and even then they only exist as attachments. In other
words, there's no
>way to say "get me the instance of this meeting for 29th
March 2123" by
>ENTRYID, firstly because it's not there yet (or otherwise
if you had a
>recurrence that never ended, it'd have to create an
infinite number of
>messages in the store for each instance), and secondly

because even when it
Quote:>is, it doesn't have an ENTRYID as such.

> Also, the only way to change instances of recurring

meetings is to search
Quote:>by date, CDO doesn't support doing it any other way. You
could do it all by
>hand in raw ExMAPI/low-level CDO, but that's a _big_

pain. See many past

- Show quoted text -

Quote:>posts here (author 'fbs' for lots of stuff he's been
going through) for
>more evidence of that.

> -- dan

>.

 
 
 

HOWTO- manage multiple sessions in Outlook Calendar

Post by Daniel Mitchell [MVP » Thu, 10 Apr 2003 10:14:26




Quote:> To summarize:
> 1) CDO 1.21 appears to be the best approach for this.

 Yeah, as long as you can manage the install requirements (ie you have to
have it installed and steer clear of service packs/the security patch),
it's the easiest way to go by a _long_ way.

Quote:> 2) Forget about using recurring meetings -- use individual
> meeting requests and keep track of the separate instances
> in my app.

> Hopefully this will be close to the end of my questions,
> but in the M-T-F example, does this mean that I need to
> send out 3 separate meeting requests both when a meeting
> is initially scheduled and when anything changes?  (Some
> of my customers may have a class that is scheduled with 50
> sessions, so this could get timeconsuming.)  Can this be
> avoided or minimized by using CDO to manipulate the
> calendar directly?

 Basically, Outlook (or CDO) don't have any concept of a recurring meeting
that's "monday 10:00, tuesday 11:00, friday 12:00", so you'll have to tie
them together yourself. You can make every meeting on monday the same
recurrence, but you'll need three recurrences for the entire set of
triples.

 This may be easier than keeping track of every instance for all time, it
may not -- that depends on how often you expect things to break out of
those weekly recurrences.

 Reschedules; if you have the above, and want to move all of the meetings
on every day back an hour, you have to send out three updates, one for mon,
one for tue, one for fri.

 If you want to move just the one on Tuesday the 18th, say, you only have
to send out one reschedule.

 Keeping track of the fact that there's three recurrences all tied together
(or a whole pile of instances -- you might be able to get away with
creating all the instances for a meeting as individual meetings if there's
few enough of them. Note that if you do that, then every recipient will
have to hit 'accept' once for each _instance_, which could be a big pain)

 As for manipulating the calendar directly, you can always avoid sending
requests, _if_ the person that's running your app has full access to
everyone else's mailbox. In that case, you can just open up all the
mailboxes and poke around and adjust things as you like.  Note that for
stupid CDO reasons, you'll need to have login access to everyone's mailbox,
not just their calendar. (or you need to see if the calendar prefix hack
(see past messages here) will work, which introduces some *
dependencies on everyone's calendar being in the same store)

Quote:> Also, if I decide to pursue a consultant for this, is it
> bad etiquette to post for such in this newsgroup?

 Nope, that should be fine. Advertising if you _are_ a consultant is more
frowned on, but as it is you're just asking for help and being willing to
pay for it.

 -- dan