View Single Post
  #6  
Old June 25th 07, 04:40 AM posted to microsoft.public.outlook.program_forms
Khyati
external usenet poster
 
Posts: 10
Default Resource Conflict on Outlook custom Form

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.

"Sue Mosher [MVP-Outlook]" wrote:

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


"Khyati" wrote in message ...
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.Star t),
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

"Sue Mosher [MVP-Outlook]" wrote:

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.



"Khyati" wrote in message ...
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


Ads