A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Get FreeBusy information for a Room/resource



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 20th 09, 02:28 PM posted to microsoft.public.outlook.program_vba
marius
external usenet poster
 
Posts: 10
Default 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
Ads
  #2  
Old May 21st 09, 02:15 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default 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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get FreeBusy information for a Room Marius Outlook - Calandaring 1 May 19th 09 09:37 PM
OL2K3 Why cant I see Conference Room resource information avlbty? OLuserdudeguy Outlook - Calandaring 3 September 7th 06 06:12 PM
conference room without Resource monmha Outlook - Calandaring 3 May 24th 06 05:15 PM
Resource Room booking WooYing Outlook - General Queries 8 April 26th 06 11:45 PM
Resource Room booking WooYing Outlook - Calandaring 8 April 26th 06 11:45 PM


All times are GMT +1. The time now is 08:35 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-2025 Outlook Banter.
The comments are property of their posters.