Avatar of 4eyesgirl
4eyesgirl

asked on 

Extract Meeting Attendance data of meeting rooms from Exchange 2003/2007

We have a need to analyze meeting utilization, by comparing the number of attendee to the room capacity.  Is there a way to pull this data programmically from Exchange for all meeting rooms?

ExchangeEmail ServersOutlook

Avatar of undefined
Last Comment
David Lee
Avatar of David Lee
David Lee
Flag of United States of America image

Hi, 4eyesgirl.

I might be able to do this with a bot of scripting.  Is that an option?  
Avatar of 4eyesgirl
4eyesgirl

ASKER

Sure.  scripting is fine.
what type of scripting? vb script?

thanks!
Avatar of David Lee
David Lee
Flag of United States of America image

VBA not VBScript.  There's a slight difference in syntax and capability, but the big difference is that VBScript runs from outside Outlook while VBA runs from inside.  Here's the code for doing this.  Follow these instrcutions to use it.

1.  Start Outlook.
2.  Click Tools > Macro > Visual Basic Editor.
3.  If not already expanded, expand Modules and click on Module1.
4.  Copy the code below and paste it into the right-hand pane of the VB Editor.
5.  Edit the code as needed.  I placed comment lines where things need to change.
6.  Click the diskette icon on the toolbar to save the changes.
7.  Close the VB Editor.
8.  Click Tools->Macro->Security.
9.  Change the Security Level setting to Medium.
10.  Run the macro.  It produces an HTML file listing all meetings, the date the meeting occurs on, and the sum of attendees who have accepted or tentatively accepted.
Sub CountAttendees()
    Dim olkItems As Object, olkAppt As Object, olkAttendee As Object, objFSO Object, objFile As Object, intAttendees As Integer
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    'Change the file name and path on the next line as desired.'
    Set objFile = objFSO.CreateTextFile("C:\eeTesting\Appointments.html")
    objFile.WriteLine "<table>"
    Set olkItems = Outlook.Application.Session.GetDefaultFolder(olFolderCalendar).Items
    olkItems.Sort "[Start]"
    olkItems.IncludeRecurrences = True
    'Change the dates/times on the next line as desired.'
    Set olkItems = olkItems.Restrict("[Start] >= '" & Format("1/1/2008 12:01am", "ddddd h:nn AMPM") & "' AND [Start] <= '" & Format("12/31/2008 11:59pm", "ddddd h:nn AMPM") & "'")
    For Each olkAppt In olkItems
        Debug.Print olkAppt.Subject
        If olkAppt.MeetingStatus = olMeeting Then
            intAttendees = 0
            For Each olkAttendee In olkAppt.Recipients
                Select Case olkAttendee.MeetingResponseStatus
                    Case olResponseAccepted, olResponseTentative
                        intAttendees = intAttendees + 1
                End Select
            Next
            objFile.WriteLine "<tr><td>" & olkAppt.Subject & "</td><td>" & olkAppt.Start & "</td><td>" & intAttendees & "</td></tr>"
        End If
        DoEvents
    Next
    objFile.WriteLine "</table>"
    objFile.Close
    Set objFile = Nothing '
    Set objFSO = Nothing
    Set olkAttendee = Nothing
    Set olkAppt = Nothing
    Set olkItems = Nothing
    MsgBox "Done"
End Sub

Open in new window

Avatar of 4eyesgirl
4eyesgirl

ASKER

This cool! However, it seems only pull meetings I am access to.  How do I extract all meetings which includes meetings I did not get a invite for?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Exchange
Exchange

Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.

213K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo