Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

Quickly Querying the Contents of an Appointment (Calendar) Folder

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?

Mike
0
shacho
Asked:
shacho
  • 2
1 Solution
 
David LeeCommented:
Hi, shacho.

Try using the Find or Restict methods of the folder's Items property.
0
 
shachoAuthor Commented:
Wow.  That's clever.  Unfortunately it did not result in a performance gain, but I pretty certain that if there were a way to do it, this would be the way.  Thanks for the tip.

Mike
0
 
David LeeCommented:
You're welcome, Mike.  You should see a big performance gain over looping through all records.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now