banner



Copy Attendee List From Outlook

Concluding reviewed on September 16, 2019   30 Comments

Applies to: Outlook 2019 (Win), Outlook 2016 (Win), Outlook 2013, Outlook 2010, Outlook 2007

Outlook 2010 and upwardly includes a Copy Status to Clipboard command under the Tracking tab (or employ Ctrl+A, C to Select All, and Copy), but prior to Outlook 2010, the only way to get a list of coming together attendees and their responses was past taking a screenshot or using VBA.

Use the Copy in Clipboard command to get tracking details in Outlook 2010 and up

This code sample gets the appointment details and attendees (along with their responses) and inserts information technology into a new Outlook bulletin form, which you can print, send or re-create the data for use in other applications.

create a list of responses

See More Information for links to VBA code samples that send the information to Give-and-take or Excel.

Don't forget to adjust your macro security settings to allow macros to run!

Get Meeting Attendee Listing Macro

To use, open Outlook's VBA Editor by pressing Alt+F11. Right click on the Project1 in the left pane and choose Insert > Module. Copy this code and paste it into the Module.

Get the GetCurrentItem function from Outlook VBA: work with open particular or selected item and paste information technology at the end of the module.

And so select or open a coming together yous organized and run the macro to create a message containing the coming together details. The total counts of accepted, declined, tentative, and no response is added to the list.

Sub GetAttendeeList() ' GetCurrentItem function: https://slipstick.me/9hu-b Dim objApp As Outlook.Application Dim objItem Equally Object Dim objAttendees Every bit Outlook.Recipients Dim objAttendeeReq As String Dim objAttendeeOpt As String Dim objOrganizer As String Dim dtStart As Appointment Dim dtEnd As Date Dim strSubject Every bit String Dim strLocation Equally Cord Dim strNotes Every bit Cord Dim strMeetStatus Every bit Cord Dim strCopyData Every bit String Dim strCount  as Cord   On Error Resume Next   Gear up objApp = CreateObject("Outlook.Application") Set objItem = GetCurrentItem() Set up objAttendees = objItem.Recipients   On Mistake GoTo EndClean:  ' Is it an appointment If objItem.Class <> 26 Then   MsgBox "This code simply works with meetings."   GoTo EndClean: Terminate If   ' Get the data dtStart = objItem.Start dtEnd = objItem.Stop strSubject = objItem.Subject strLocation = objItem.Location strNotes = objItem.Body objOrganizer = objItem.Organizer objAttendeeReq = "" objAttendeeOpt = ""   ' Get The Attendee List For 10 = ane To objAttendees.Count    strMeetStatus = ""    Select Instance objAttendees(x).MeetingResponseStatus      Example 0        strMeetStatus = "No Response"        ino = ino + one      Case 1        strMeetStatus = "Organizer"        ino = ino + one      Instance 2        strMeetStatus = "Tentative"        information technology = information technology + one      Case 3        strMeetStatus = "Accustomed"        ia = ia + one      Example 4        strMeetStatus = "Declined"        ide = ide + ane    End Select If objAttendees(x).Name <> objOrganizer Then      If objAttendees(x).Type = olRequired So       objAttendeeReq = objAttendeeReq & objAttendees(x).Proper noun & vbTab & strMeetStatus & vbCrLf    Else       objAttendeeOpt = objAttendeeOpt & objAttendees(10).Name & vbTab & strMeetStatus & vbCrLf    Stop If  Finish If Next     strCopyData = "Organizer: " & objOrganizer & vbCrLf & "Subject area:  " & strSubject & vbCrLf & _   "Location: " & strLocation & vbCrLf & "Start:    " & dtStart & vbCrLf & "End:     " & dtEnd & _   vbCrLf & vbCrLf & "Required: " & vbCrLf & objAttendeeReq & vbCrLf & "Optional: " & _   vbCrLf & objAttendeeOpt & vbCrLf & "NOTES " & vbCrLf & strNotes     strCount = "Accepted: " & ia & vbCrLf & _   "Declined: " & ide & vbCrLf & _   "Tentative: " & it & vbCrLf & _   "No response: " & ino      Ready ListAttendees = Awarding.CreateItem(olMailItem)   ListAttendees.Body = strCopyData & vbCrLf & strCount   ListAttendees.Display     EndClean: Set objApp = Goose egg Set objItem = Nothing Set objAttendees = Aught Stop Sub              

Include other contact fields

If you desire to include other contact fields in the printout, you can do a lookup of the contact then add any contact field to the string stored in objAttendeeReq and objAttendeeOpt as seen in the snippet below.

Because the attendee'due south name may include the email accost in Fullname (email@address) format, I'grand using just the e-mail address in the search query. I'grand using the mailing address field because it volition always have an entry, should yous have a mix of Dwelling and Business addresses in your contacts. Alternately, you lot could use an If statement - if the business concern accost is blank use the dwelling address instead.

Naturally, for this to piece of work you need to have a contact for the attendee, with the field you are using filled in.

strAttendeeName = objAttendees(x).address  Gear up oContact = colItems.Observe("[Email1Address] = '" & strAttendeeName & "'")                If Not oContact Is Nothing Then          strCity = oContact.MailingAddressCity & ", " & oContact.MailingAddressState      Finish If       If objAttendees(10).Type = olRequired And so       objAttendeeReq = objAttendeeReq & objAttendees(x).name & vbTab & strMeetStatus & vbTab & strCity & vbCrLf    Else       objAttendeeOpt = objAttendeeOpt & objAttendees(10).name & vbTab & strMeetStatus & vbTab & strCity & vbCrLf    Terminate If  Next              

A full working macro containing the lawmaking snippet is at Include Contact Fields Macro.

Re-create the Invitees and Responses to the Meeting Torso (Notes field)

A user needed to Move meeting invitations from her calendar to shared calendar only doing so erased the tracking results. While you can't foreclose that from happening, you can preserve the tracking history by copying it to the Notes field in the appointments. When you only need to add the tracking results to a few meetings, doing it manually is fast - select all and copy the tracking then paste information technology in the body - a macro is faster if you demand to add the tracking to a lot of meetings. Information technology's likewise formatted a lilliputian nicer.

As written, y'all'll select the meeting and run the macro. Rinse and Repeat for every coming together. (Information technology goes fast if you add a button for the macro the ribbon.) It could be tweaked to add the tracking results to every meeting in your calendar or only for selected meetings.

Become the GetCurrentItem function from Outlook VBA: piece of work with open item or selected item and paste it at the end of the module. This allows you to use the macro with an open up or selected meeting.

Sub CopyAttendeesToBody() ' GetCurrentItem function: https://slipstick.me/9hu-b Dim objApp Equally Outlook.Application Dim objItem As Object Dim objAttendees As Outlook.Recipients Dim objAttendeeReq As String Dim objAttendeeOpt Equally Cord Dim objOrganizer As String Dim dtStart As Date Dim dtEnd As Date Dim strSubject As String Dim strLocation Every bit String Dim strNotes As String Dim strMeetStatus As String Dim strCopyData As String Dim strCount  Equally String  On Error Resume Adjacent   Set objApp = CreateObject("Outlook.Application") Set objItem = GetCurrentItem() Set objAttendees = objItem.Recipients   On Mistake GoTo EndClean:  ' Is it an appointment If objItem.Class <> 26 Then   MsgBox "This lawmaking only works with meetings."   GoTo EndClean: End If   ' Get the data objOrganizer = objItem.Organizer objAttendeeReq = "" objAttendeeOpt = ""   ' Become The Attendee List For 10 = one To objAttendees.Count    strMeetStatus = ""    Select Example objAttendees(ten).MeetingResponseStatus      Example 0        strMeetStatus = "No Response"        ino = ino + 1      Example ane        strMeetStatus = "Organizer"        ino = ino + i      Case 2        strMeetStatus = "Tentative"        information technology = it + 1      Case three        strMeetStatus = "Accepted"        ia = ia + one      Instance 4        strMeetStatus = "Declined"        ide = ide + 1    Finish Select    If objAttendees(x).Name <> objOrganizer Then    If objAttendees(ten).Type = olRequired Then       objAttendeeReq = objAttendeeReq & objAttendees(ten).Name & vbTab & strMeetStatus & vbCrLf    Else       objAttendeeOpt = objAttendeeOpt & objAttendees(10).Name & vbTab & strMeetStatus & vbCrLf    End If End If Side by side   strCopyData = "Required: " & vbCrLf & objAttendeeReq & vbCrLf & "Optional: " & _   vbCrLf & objAttendeeOpt     strCount = "Accepted: " & ia & vbCrLf & _   "Declined: " & ide & vbCrLf & _   "Tentative: " & it & vbCrLf & _   "No response: " & ino        objItem.Body = strCopyData & vbCrLf & strCount & vbCrLf & vbCrLf & objItem.Trunk   objItem.Relieve  '.Display     EndClean: Gear up objApp = Nothing Set objItem = Nothing Set objAttendees = Nothing Finish Sub              

More Data

Print appointment with attendee condition The master code; it prints the appointment details and attendee responses to a Word document.
Outlook Meeting Tracking Export prints the attendee responses to Excel.

Copy Attendee List From Outlook,

Source: https://www.slipstick.com/developer/list-meeting-attendees-responses/

Posted by: kleinrepasustem1946.blogspot.com

0 Response to "Copy Attendee List From Outlook"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel