0

I've made a Windows Forms application in Visual Studio which is connected to Outlook and lists my upcoming appointments. It also checks if I'm busy or free at the current time or not. This is working fine.

For the project we're doing, I need to check the busy/free state for other people in the company as well. I know I can see this in the Outlook Web App when I want to schedule an appointment. It's in the sceduling assistant.

Is there a way I can do this from my C# application?

Thanks in advance!

Bryan
  • 83
  • 5

1 Answers1

0

I believe you can automate Outlook to get the required information. See C# app automates Outlook (CSAutomateOutlook) for a sample code.

The FreeBusy method of the Recipient class returns free/busy information for the recipient. For example:

Public Sub GetFreeBusyInfo() 
  Dim myNameSpace As Outlook.NameSpace 
  Dim myRecipient As Outlook.Recipient 
  Dim myFBInfo As String  
  Set myNameSpace = Application.GetNamespace("MAPI") 
  Set myRecipient = myNameSpace.CreateRecipient("Nate Sun") 
  On Error GoTo ErrorHandler 
  myFBInfo = myRecipient.FreeBusy(#4/24/2015#, 60 * 24) 
  MsgBox myFBInfo 
  Exit Sub 
 ErrorHandler: 
  MsgBox "Cannot access the information. " 
End Sub
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45