Solved

Getting calendar events for today

Posted on 2011-03-03
4
476 Views
Last Modified: 2012-05-11
I have an application that broadcasts a user's current Outlook calendar status.  This application uses MAPI to retrieve calendar items.  It is simple enough to get items for the current day, however repeating meeting items are stored such that just one item is created with all of the repeat details stored in a byte array.  Because of this my application must analyze ALL of the calendar entries, first for if they repeat and if so, parse the byte array to see if the current date is present.

This is terribly slow since some of my users have years of calendar data.

Is there a faster way to do this?  Does Exchange provide any kind of query mechanism?

I have looked at CDO and Redemption, but though these libraries would help me, for various reasons, I cannot use them.
0
Comment
Question by:jlalande
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:pchui
ID: 35041443
Have you considered using the Outlook Object Model?

http://msdn.microsoft.com/en-us/library/dd490722(v=office.12).aspx#Y556

0
 

Author Comment

by:jlalande
ID: 35043663
I have and the Outlook Object Model does exactly what I need without much fuss.

The downside is that it depends on Outlook running.  If Outlook isn't running, an Outlook process is created. This is fine, but if a user has Outlook running or later starts Outlook, then closes it, there is no longer an Outlook process and my application stops receiving Outlook Object Model events.

What I am looking for are some MAPI calls that will return a list of calendar entries that are occurring today, including calendar entries created in the past that are repeating/recurring today.
0
 
LVL 2

Accepted Solution

by:
pchui earned 500 total points
ID: 35044541
I don't know how you would do that in MAPI differently from what you initially described.

Your application is a background process or service and it's hooked into Outlook with an event handler? Can you structure your app so that it periodically connects to Outlook, retrieves the calendar items, then disconnect from Outlook? If user has Outlook already running, OOM should use the existing instance but starts Outlook in the background if it was not.
0
 

Author Closing Comment

by:jlalande
ID: 35181416
"No" is a valid answer.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Changing a few Outlook Options can help keep you organized!
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question