Get FreeBusy information for a Room/resource

  • Thread starter Thread starter Marius
  • Start date Start date
M

Marius

Hi I am trying to get FreeBusy for a resource, is this possible?

I tried to use:

private void SetRecipientTypeForAppt()
{

Outlook.Application oApp = new
Microsoft.Office.Interop.Outlook.Application();
Outlook.AppointmentItem appt =
oApp.CreateItem(Outlook.OlItemType.olAppointmentItem) as
Outlook.AppointmentItem;

appt.Subject = "Customer Review";
appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting;
appt.Location = "(e-mail address removed)";
appt.Start = DateTime.Parse("5/23/2009 10:00 AM");
appt.End = DateTime.Parse("5/23/2009 11:00 AM");

Outlook.Recipient recipRequired = appt.Recipients.Add("Bob Smith");

recipRequired.Type = (int)Outlook.OlMeetingRecipientType.olRequired;


Outlook.Recipient recipOptional = appt.Recipients.Add("Tom Jones");

recipOptional.Type = (int)Outlook.OlMeetingRecipientType.olOptional;

Outlook.Recipient recipConf = appt.Recipients.Add("(e-mail address removed)");

recipConf.Type = (int)Outlook.OlMeetingRecipientType.olResource;

appt.Recipients.ResolveAll();
appt.Display(false);

MessageBox.Show(recipConf.FreeBusy(DateTime.Now, 15, false));

}

However the last line throuws a COM exception. Is it possible to retrieve
FreeBusy or appointment dates from a Resource?

Regards
Marius
 
Back
Top