Solved

Getting calendar events for today

Posted on 2011-03-03
4
472 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
  • 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

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Outlook Free & Paid Tools
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now