PC Review


Reply
Thread Tools Rate Thread

Checking for free busy status

 
 
GSK
Guest
Posts: n/a
 
      27th Nov 2007
I am checking for resource availability and checking for any conflicts with
other meetings.
I want to check on a 30 mins interval. The code below is not working.
iCurrentSlotStart and iCurrentSlotEnd in the below code always returns 0.
Please help to make this work.
Thanks in advance

Regards

Sub CommandButton3_Click()

StartDate = FormatDateTime("11/28/2007 1:30:00 PM")
EndDate = FormatDateTime("11/28/2007 2:30:00 PM")

strFreeBusy =
Item.Recipients(1).FreeBusy(FormatDateTime(StartDate,vbShortDate), 30, False)
oRecipient.resolve
iCurrentSlotStart = Int(DateDiff("n", CDate(StartDate),
CDate(StartDate)) \ 30)
iCurrentSlotEnd = Int(DateDiff("n", CDate(EndDate), CDate(EndDate))
\ 30)
strFreeBusyTemp = Left(strFreeBusy, iCurrentSlotEnd)
strFreeBusyTemp2 = StrReverse(strFreeBusyTemp)
strFreeBusy2 = StrReverse(Left(strFreeBusyTemp2,
Len(strFreeBusyTemp2) - iCurrentSlotStart))
iBusySlot = InStr(1, strFreeBusy2, "1")

If iBusySlot <> 0 Then
Msgbox "Conflict with another meeting"
Exit Sub
End If

End Sub
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      27th Nov 2007
I'm not sure what you're trying to do with this expression:

DateDiff("n", CDate(StartDate), CDate(StartDate))

It would always return 0, because the two dates are identical.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"GSK" <(E-Mail Removed)> wrote in message news:B25A182C-D25D-47F6-ACBD-(E-Mail Removed)...
>I am checking for resource availability and checking for any conflicts with
> other meetings.
> I want to check on a 30 mins interval. The code below is not working.
> iCurrentSlotStart and iCurrentSlotEnd in the below code always returns 0.
> Please help to make this work.
> Thanks in advance
>
> Regards
>
> Sub CommandButton3_Click()
>
> StartDate = FormatDateTime("11/28/2007 1:30:00 PM")
> EndDate = FormatDateTime("11/28/2007 2:30:00 PM")
>
> strFreeBusy =
> Item.Recipients(1).FreeBusy(FormatDateTime(StartDate,vbShortDate), 30, False)
> oRecipient.resolve
> iCurrentSlotStart = Int(DateDiff("n", CDate(StartDate),
> CDate(StartDate)) \ 30)
> iCurrentSlotEnd = Int(DateDiff("n", CDate(EndDate), CDate(EndDate))
> \ 30)
> strFreeBusyTemp = Left(strFreeBusy, iCurrentSlotEnd)
> strFreeBusyTemp2 = StrReverse(strFreeBusyTemp)
> strFreeBusy2 = StrReverse(Left(strFreeBusyTemp2,
> Len(strFreeBusyTemp2) - iCurrentSlotStart))
> iBusySlot = InStr(1, strFreeBusy2, "1")
>
> If iBusySlot <> 0 Then
> Msgbox "Conflict with another meeting"
> Exit Sub
> End If
>
> End Sub

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to hide free/busy status vic Microsoft Outlook Calendar 1 4th Nov 2009 10:09 PM
All Day Event Free/Busy Status The Merg Microsoft Outlook Calendar 5 30th Aug 2007 11:48 PM
Using C# to get the free/busy status of user =?Utf-8?B?SmVmZg==?= Microsoft C# .NET 2 4th Jun 2007 10:28 AM
Free/busy status on public Folders =?Utf-8?B?am9obg==?= Microsoft Outlook Discussion 1 3rd Nov 2006 11:15 PM
How can I add another time status (other than Free,Busy,Tentitive, =?Utf-8?B?RWQgUw==?= Microsoft Outlook Calendar 3 10th Oct 2006 07:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:19 PM.