Overlapping Appointments

  • Thread starter Thread starter Tadwick
  • Start date Start date
T

Tadwick

If I want to determine if an appointment in a calendar folder overlaps
(conflicts) with other appointment items, do I have to check its start and
duration against all other appointment items? Presumably, sorting by sort
date could optimize this.

Is there any OOM functionality in OL2007/Exch 2007 (or earlier) that makes
this task easier?

Tx, Tad
 
I can see how this makes sense for individual appointments but what if I want
to identify all overlaps for hundreds of appointments? I'm concerned about
the efficiency of running the find/restrict method on each item. Would it be
more efficient to retrieve all items (including instances and exceptions to
recurring items), sort and then loop over them? If you sort them into two
identical arrays you could loop through the first array and then for each
item search the second array starting at the current index of the first and
incrementing until the start value is greater than end value of the current
index item.
 
That's a bit of a different scenario. Your array approach sounds good. You still need to restrict appointments to a finite date range, however, because otherwise, if you have any recurring appointments without end dates, you will be dealing with an infinite number of appointments.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Back
Top