![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
Sorting won't help you with overlapping appointments. Instead, use the Items.Find or Restrict method over the date range on the target folder; see http://www.outlookcode.com/article.aspx?id=30
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tadwick" wrote in message ... 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 |
#3
|
|||
|
|||
![]()
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. "Sue Mosher [MVP-Outlook]" wrote: Sorting won't help you with overlapping appointments. Instead, use the Items.Find or Restrict method over the date range on the target folder; see http://www.outlookcode.com/article.aspx?id=30 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tadwick" wrote in message ... 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 |
#4
|
|||
|
|||
![]()
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 "Tadwick" wrote in message ... 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. "Sue Mosher [MVP-Outlook]" wrote: Sorting won't help you with overlapping appointments. Instead, use the Items.Find or Restrict method over the date range on the target folder; see http://www.outlookcode.com/article.aspx?id=30 "Tadwick" wrote in message ... 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? |
#5
|
|||
|
|||
![]()
Thanks, Sue - I should have been more clear in my OP.
"Sue Mosher [MVP-Outlook]" wrote: 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 "Tadwick" wrote in message ... 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. "Sue Mosher [MVP-Outlook]" wrote: Sorting won't help you with overlapping appointments. Instead, use the Items.Find or Restrict method over the date range on the target folder; see http://www.outlookcode.com/article.aspx?id=30 "Tadwick" wrote in message ... 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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
overlapping appointments | cpslovac | Outlook - Calandaring | 3 | August 28th 07 03:04 AM |
Overlapping appointments | Louise | Outlook - Calandaring | 3 | June 9th 07 05:52 PM |
Find overlapping appointments | Kerstin Schiebel | Outlook and VBA | 2 | April 4th 07 03:45 PM |
How to restrict overlapping appointments | BigChief_Nor | Outlook - Calandaring | 0 | November 1st 06 01:00 PM |
Track Overlapping appointments on the Calender | Sangeeta | Outlook - Calandaring | 0 | June 16th 06 10:23 PM |