Quickly Querying the Contents of an Appointment (Calendar) Folder
Posted on 2007-10-14
I am not very familiar with the Outlook object model, but I have managed to write a program that works out all of my appointments for the next 10 days and emails them to my cell phone by looping through all appointments and collecting the ones that fit certain criteria. It works, but because I have to loop through everything it is slow. Is there a smarter way to achieve this goal? For example, is there a way to perform a structured query on the contents of the appointments folder, or is there a way to sort the contents of the folder by date so that I only need to loop through a portion of the items? Or perhaps I could interrogate the explorer, which has already worked out what's coming up in the next 10 days?