Quantcast
Channel: Macro – Ross Goodman
Viewing all articles
Browse latest Browse all 10

Outlook Meeting Attendees In The Invite Body

$
0
0

Personally I do not like the way that Microsoft Outlook prints out meetings especially the fact that attendees are a comma separated list.
I prefer to see all the attendees as a tabular list – with their acceptance response so that I can tick them off as they join the meeting.

The following macro will do this for you.
NOTE 1 : this macro is amending the text of the body of the meeting invite, if you save this and send an update – everyone will see this. I prefer to just run the macro, print the meeting and then close without saving.
NOTE 2 : this is a one off snapshot of the attendee status, if further responses or updates are received you will have to delete the old text then re-run the macro.

Create the following macro (Alt+F11)

Public Sub UpdateAppointmentWithAttendees()
    
    Dim item As Object
    Dim olAppointmentItem As Outlook.AppointmentItem
    Dim objAttendees As Outlook.Recipients
    Dim strAttendees, strMeetStatus As String
    Dim x   As Integer
        
    If TypeName(Application.ActiveWindow) = "Inspector" Then
        Set item = Application.ActiveWindow.CurrentItem
        If TypeOf item Is Outlook.AppointmentItem Then
            Set olAppointmentItem = item
            Set objAttendees = olAppointmentItem.Recipients
            strAttendees = "Attendee Status : " & vbLf & vbLf
            For x = 1 To objAttendees.Count
                Select Case objAttendees(x).MeetingResponseStatus
                    Case 0
                        strMeetStatus = "No Response (or Organiser)"
                    Case 1
                        strMeetStatus = "Organiser"
                    Case 2
                        strMeetStatus = "Tentative"
                    Case 3
                        strMeetStatus = "Accepted"
                    Case 4
                        strMeetStatus = "Declined"
                End Select
                strAttendees = strAttendees & objAttendees(x).Name & " : " & strMeetStatus & vbLf
            Next x
            olAppointmentItem.Body = strAttendees & vbLf & "--------" & vbLf & vbLf & olAppointmentItem.Body
        Else
            MsgBox ("Ony works from an appointment !")
        End If
    End If
End Sub

You can then run this macro when you have a meeting open – I have added the macro to the toolbar for ease of access.


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images