VB - Outlook question: How can I check if someone is in a meeting ?
How can I tell if someone who uses outlook in lan is currently in a meeting ?
Thanks !
Re: VB - Outlook question: How can I check if someone is in a meeting ?
Moved to Office Development
Re: VB - Outlook question: How can I check if someone is in a meeting ?
You can either do a .Restrict or a .Find for the person on the Calendar in question checking the date range.
Re: VB - Outlook question: How can I check if someone is in a meeting ?
Thanks RobDog,
But I don't know the vb - outlook interface that well,
can you add a small piece of code to explain ?
Re: VB - Outlook question: How can I check if someone is in a meeting ?
This should give you all the mechanics to do what you need.
VB Code:
Option Explicit
'Code written by RobDog888
'Add a reference to MS Outlook xx.0 Object Library
Private Sub Command1_Click()
Dim oApp As Outlook.Application
Dim oAppts As Outlook.Items
Dim oAppt As Object 'Late bind as Object in case there are other types of calendar items (Appt or Meeting)
Dim sToday As String
Set oApp = New Outlook.Application
Set oAppts = oApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items
oAppts.Sort "[Start]"
oAppts.IncludeRecurrences = True
'Restrict the collection to just today
sToday = "([Start] >= '" & Date & " 12:00 AM' AND [Start] < '" & DateAdd("d", 1, Date) & " 12:00 AM')"
sToday = sToday & " AND"
sToday = sToday & " ([Subject] = 'Crucial Meeting')"
Set oAppts = oAppts.Restrict(sToday)
oAppts.Sort "[Start]"
Set oAppt = olAppts.GetFirst
Do While TypeName(oAppt) <> "Nothing"
'Display all the appointments during this day and with the subject 'Crucial Meeting'
MsgBox oAppt.Subject & vbNewLine & oAppt.Start & " - " & oAppt.End, vbOKOnly, "Meeting Date/Time"
Set oAppt = oAppts.GetNext
Loop
Set oAppt = Nothing
Set oAppts = Nothing
oApp.Quit
Set oApp = Nothing
End Sub
Re: VB - Outlook question: How can I check if someone is in a meeting ?
Thanks RobDog888, That's looks great !! :wave:
Re: VB - Outlook question: How can I check if someone is in a meeting ?
One last thing...
This code return my schedule. How can I tell if someone else is busy right now ?
Re: VB - Outlook question: How can I check if someone is in a meeting ?
You will need to open the Calendar where that info is like a Public Calendar or a Shared Calendar.