0

I want to make a simple application in Visual Studio that checks if a certain person has an appointment at the current time. Our company works with the Outlook Calendar, so I'd like to connect that to Visual Studio. I've seen some things out there, but it all seems a bit complex for the goal I want to achieve.

To give an example, I want to know if one of my colleagues has an appointment at this time, so I can set a variable true or false.

Does anyone know how to do this?

Bryan
  • 83
  • 5
  • This may be somewhere along the lines of what you're looking for: http://stackoverflow.com/questions/90899/net-get-all-outlook-calendar-items – Josh L. Apr 15 '15 at 12:34

2 Answers2

0

It looks like you need to automate Outlook from your application. The How to automate Outlook and Word by using Visual C# .NET to create a pre-populated e-mail message that can be edited article describes all the required steps. Also you may find the C# app automates Outlook (CSAutomateOutlook) sample project helpful.

In case if you need to develop an Outlook add-in, see Walkthrough: Creating Your First Application-Level Add-in for Outlook for more information.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
0

To retrieve user availability, either use Application.Sesssion.CurrentUser to retrieve the Recipient object representing the current user or call Applicatiobn.Session.CreateRecipient passing the name of the other user. Once you have the Recipient object, call Recipient.FreeBusy to retrieve a string representing user availability in the given time range.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • I've been messing around with it a bit, but I get an error everytime I try to execute a very simple program which sends an email: "System.Runtime.InteropServices.COMException(8000FFFF)". I tried running the program as an administrator and a tip that Microsoft had on their website, edited a registry value. I only got it to send an email once. I still have exactly the same program, but I can't get the error away. – Bryan Apr 16 '15 at 12:32