Extracting attendee status from calendar entries

  • Thread starter Thread starter Stephane Barizien
  • Start date Start date
S

Stephane Barizien

I'm desperately trying to extract the list of attendees with
Accepted/Declined/Tentative/No answer status from a calendar meeting object.

I've started from the code at:

http://www.ericwoodford.com/my_html_calendar_generating_script_for_exchange_2003

in order to avoid starting from scratch.

I cannot get code that would use "urn:schemas:calendar:attendeestatus" (in
the query) / "d:attendeestatus" (in the processing of the response) to
work...

Any clue?


TIA
 
Whoa - hang on one second! That sample code you were looking at is for your
system administrator and requires some fairly advanced knowledge - not to
mention access to systems you don't have permissions to. But forgive me if
you ARE a system admin who wants to deploy this script to a web server - then
we'll come back to this. Otherwise, what you want to do is easily done with
some Outlook VBA code:

Sub ListStatusOfMeetingAttendees()
On Error GoTo ListStatusOfMeetingAttendees_Error
'Must have an active Meeting Request item open and active

Dim objMR As Outlook.MeetingItem
Dim objRecip As Outlook.Recipient

Set objMR = ActiveInspector.CurrentItem

'MeetingResponseStatus values:
' olResponseAccepted = 3
' olResponseDeclined = 4
' olResponseNone = 0
' olResponseNotResponded = 5
' olResponseOrganized = 1
' olResponseTentative = 2

For Each objRecip In objMR.Recipients
Debug.Print objRecip.Name & "; Status = " &
objRecip.MeetingResponseStatus
Next

Set objMR = Nothing
Set objRecip = Nothing

On Error GoTo 0
Exit Sub

ListStatusOfMeetingAttendees_Error:

MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
ListStatusOfMeetingAttendees of Module basCalendarMacros"
Resume Next
End Sub
 
Eric said:
Whoa - hang on one second! That sample code you were looking at is
for your system administrator and requires some fairly advanced
knowledge - not to mention access to systems you don't have

I am a senior developer on a 150+-staff R&D site, and am also a "superuser"
among the population, with rather close contacts with the IT folks; and our
Outlook sysadm happens to be a former R&D developer...
permissions to. But forgive me if you ARE a system admin who wants
to deploy this script to a web server - then we'll come back to this.

Indeed, I was also looking into this web publication issue to work around
the way we have implemented meeting rooms: people cannot open meetings in
the meeting rooms' calendars, because we want to hide some information. In
particular, this makes it impossible to know who's booked the room, which is
a major PI* in case of conflicts / lack of rooms...

So custom code that would publish just what we want to make available would
be a solution.
Otherwise, what you want to do is easily done with some Outlook VBA
code:

Sub ListStatusOfMeetingAttendees()
On Error GoTo ListStatusOfMeetingAttendees_Error
'Must have an active Meeting Request item open and active

Problem is (I'm familiar with VBA in Word/Excel/... but not at all with
Outlook): how do I get such an object? Is there a way to add, say, a toolbar
button that would be associated with code that would retrieve the item based
on the selected meeting?

Sorry, this sounds rather dumb... You have the right to RTFM me ;-)
 
(I'm in a rush, so sorry for the lack of detail)

Open any existing meeting item with multiple attendees. Open the Outlook
VBA editor (ALT+F11), and paste the code I gave you into the
ThisOutlookSession module. Bring up the immediate windows (CTRL+G), put your
cursor in the procedure and hit F5 to run it. You should see the attendees
listed with their statuses. And yes, Outlook VBA macros can be run from a
custom command bar - look for the Macros list item when you choose the action
for the button.

Let me know if this doesn't solve your problem.
 
Eric said:
(I'm in a rush, so sorry for the lack of detail)

Open any existing meeting item with multiple attendees. Open the
Outlook VBA editor (ALT+F11), and paste the code I gave you into the
ThisOutlookSession module. Bring up the immediate windows (CTRL+G),
put your cursor in the procedure and hit F5 to run it. You should
see the attendees listed with their statuses. And yes, Outlook VBA
macros can be run from a custom command bar - look for the Macros
list item when you choose the action for the button.

Let me know if this doesn't solve your problem.

Thx for the hint. I've gotten it to work, but after changing MeetingItem to
AppointmentItem.
 
Back
Top