![]() |
Get FreeBusy information for a Room/resource
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.olAppointmentIt em) as Outlook.AppointmentItem; appt.Subject = "Customer Review"; appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting; appt.Location = "; 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 = "); 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 |
Get FreeBusy information for a Room/resource
What is that COM exception?
-- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Marius" wrote in message ... 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.olAppointmentIt em) as Outlook.AppointmentItem; appt.Subject = "Customer Review"; appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting; appt.Location = "; 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 = "); 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 |
All times are GMT +1. The time now is 05:13 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com