[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting calendar events for today

Posted on 2011-03-03
4
Medium Priority
?
481 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 1500 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month19 days, 16 hours left to enroll

873 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