Resource Conflict on Outlook custom Form

G

Guest

Hi
We are using outlook custom form to shedule web conferences. My problem is
when we slect a vedio site ( as a resource/location) and if it is alrady
booked for the specified time , then I got a outlook message

as an example :
"Arctic Ocean room is already booked for specified time. You must find
another resource or find a nother time"

I am getting this message after shceduling my meeting on the bridge abd
saving data on the databse. And meeting is not scheduled on the calendar.
What I want is to check resource availability before doing anything else.
may I know whether it is possible, if so could you pls advice me how to do
this.

Thanks
 
S

Sue Mosher [MVP-Outlook]

Take a look at the Recipient.GetFreeBusy method, which is well documented in Help. That's what you'll need to use to check resource availability.
 
G

Guest

Dear Sue

Did u mean about MSDN help. I was trying to serach from google as well. I
ended up with following code but it does not seems checking availability for
me.

Dim strFreeBusy, strFreeBusyTemp, strFreeBusyTemp2, strFreeBusy2 As String
Dim iCurrentSlotStart, iCurrentSlotEnd, iBusySlot As Integer

For Each oRecipient As Outlook.Recipient In m_olAppointmentItem.Recipients
strFreeBusy = oRecipient.FreeBusy(CDate(m_olAppointmentItem.Start),
1, False)
iCurrentSlotStart = Int(DateDiff("n",
CDate(m_olAppointmentItem.Start), CDate(m_olAppointmentItem.Start)) \ 1)
iCurrentSlotEnd = Int(DateDiff("n",
CDate(m_olAppointmentItem.End), CDate(m_olAppointmentItem.End)) \ 1)
strFreeBusyTemp = Left(strFreeBusy, iCurrentSlotEnd)
strFreeBusyTemp2 = StrReverse(strFreeBusyTemp)
strFreeBusy2 = StrReverse(Left(strFreeBusyTemp2,
Len(strFreeBusyTemp2) - iCurrentSlotStart))
iBusySlot = InStr(1, strFreeBusy2, "1")

If iBusySlot <> 0 Then
System.Windows.Forms.MessageBox.Show("Resource not
available", "vMeeting for Outlook", Windows.Forms.MessageBoxButtons.OK)
Exit Sub
End If
Next

Highly apprecitae if you could help me bit more in this. or could you please
send me links to articles describing this if possible. Thank you very much

Erosha
 
S

Sue Mosher [MVP-Outlook]

The Outlook object model is indeed documented on MSDN, but the documentation is also right there on your own machine. The object browser can act as an index to Help: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from <All Libraries> to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic.

Free/busy information is always returned for full days, not partial days. The Start parameter for FreeBusy() should be a date-only value (in other words, time = midnight), not the full date/time of the appointment. You might want to use a MinPerChar size larger than a minute. It depends on what granularity you need for booking meetings in your organization. For example, if you set it to 60 and you're interested in booking an appointment at 10 a.m., then the value of the 11th character will tell you whether there are any other appointments booked during that hour. If you book in smaller increments, use an appropriate size. Remember that your purpose in using FreeBusy is only to find conflicts, not to find out if some other appointment has exactly the same time period booked.

Sorry, BTW, that I suggested the wrong method. Recipient.FreeBusy and AddressEntry.GetFreeBusy both return the same data, but I get mixed up as to which uses which method. I'm glad you found the right one.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
G

Guest

Thanks Sue. This is really helpful. Currently I am working on it. will let
you know. Thanks again
 
G

Guest

Thank you very much sue. this worked perfectly.
But I have another questin to ask.
I scheduled a meeting as 3pm to 3.30pm with a specific meeting room as a
resource. When I schedule another meeting with the same meeting room in the
same time it doesnt show me that meeting room is occupied. it says it is
available. But After schedulinh 3-4 meeting with the same meeting room in the
same time it shows me that the room is not available... Do I need to do any
other thing... please advice.
 
S

Sue Mosher [MVP-Outlook]

Do you see the same behavior if you schedule the resource manually and look on the Scheduling tab?
 
G

Guest

Yes.. it is same. But when I check shared calendar of the resource(meeting
room) meeting is actually booked in the calendar. but it says available for
me. Even I didnt get the outlook message even saying that resource is already
booked. but after scheduling 2-3 meeting then I get is as unavailable
 
G

Guest

Hi Sue
Everything is working fine. What happened was When i select a meeting room
as a resource I used to delete from 'To' list. If so the meeting room
calendar is not get updated. but If I leave it at "To" list as well (and also
on "Resource" list or "location") It works fine. So far so good. Please
excuse me if I post more comments later as we are doing testing as a whole.

Thanks again
 

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

Top