asked on
ASKER
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
ASKER
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.
TRUSTED BY
I might be able to do this with a bot of scripting. Is that an option?