Results 1 to 8 of 8

Thread: VB - Outlook question: How can I check if someone is in a meeting ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    72

    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 !

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: VB - Outlook question: How can I check if someone is in a meeting ?

    Moved to Office Development

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    72

    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 ?

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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:
    1. Option Explicit
    2. 'Code written by RobDog888
    3. 'Add a reference to MS Outlook xx.0 Object Library
    4. Private Sub Command1_Click()
    5.    
    6.     Dim oApp As Outlook.Application
    7.     Dim oAppts As Outlook.Items
    8.     Dim oAppt As Object 'Late bind as Object in case there are other types of calendar items (Appt or Meeting)
    9.     Dim sToday As String
    10.    
    11.     Set oApp = New Outlook.Application
    12.     Set oAppts = oApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items
    13.     oAppts.Sort "[Start]"
    14.     oAppts.IncludeRecurrences = True
    15.     'Restrict the collection to just today
    16.     sToday = "([Start] >= '" & Date & " 12:00 AM' AND [Start] < '" & DateAdd("d", 1, Date) & " 12:00 AM')"
    17.     sToday = sToday & " AND"
    18.     sToday = sToday & " ([Subject] = 'Crucial Meeting')"
    19.     Set oAppts = oAppts.Restrict(sToday)
    20.     oAppts.Sort "[Start]"
    21.     Set oAppt = olAppts.GetFirst
    22.     Do While TypeName(oAppt) <> "Nothing"
    23.         'Display all the appointments during this day and with the subject 'Crucial Meeting'
    24.         MsgBox oAppt.Subject & vbNewLine & oAppt.Start & " - " & oAppt.End, vbOKOnly, "Meeting Date/Time"
    25.         Set oAppt = oAppts.GetNext
    26.     Loop
    27.     Set oAppt = Nothing
    28.     Set oAppts = Nothing
    29.     oApp.Quit
    30.     Set oApp = Nothing
    31.    
    32. End Sub
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    72

    Re: VB - Outlook question: How can I check if someone is in a meeting ?

    Thanks RobDog888, That's looks great !!

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Dec 2002
    Posts
    72

    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 ?

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width