Get FreeBusy information for a Room/resource

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top