PDA

View Full Version : Solved: Printing Tracking Page



Alasbabylon
03-18-2005, 08:39 AM
Is there a way to print the Tracking page information from a meeting maker? I need to send a projet manager a list of all the people who have been invited to a meeting, who has accepted, who has declined, and who has not responded. She wants this in a Word document, but I can't copy and paste from this page, and I sure don't want to retype the information for each meeting - some of these meetings have close to 100 people invited!

:banghead:

Killian
03-22-2005, 04:05 AM
Hi there,
I'm not clear what the tracking page from a meeting maker is...
I would be possible, with code, to list all the recipients of a meeting item and show their status (required attendee, accepted, etc) and output those to Word. Let me know if that's what you're after

Alasbabylon
03-22-2005, 10:36 AM
Pretty much. Except that I need to be able to say who hass accepted, who is tentative, and who has declined. When I send a meeting maker in MS Outlook and there are multiple attenees, I get three tabs on the meeting in my Calendar: Appointment, Scheduling, and Tracking. (MS Outlook 2002) I need the info from the Tracking tab.

Killian
03-23-2005, 04:51 AM
So it look like this might be quite straight forward... if you create a new module in your Outlook VBE and add the routine below, if you have an appointment selected in your calender and run it, it will display the meeting details and the recipient responses in a message box.
If this is what you want, you just need to output the strings to Word/Excel/text file.
Note that the MeetingResponseStatus returns an integter so you might want to use a select case function to return the status as text as well as format the string for more readable output.
Sub MeetingInfo()
Dim ai As Outlook.AppointmentItem
Dim tempstring As String
Dim r As Recipient

'if there is one item selected and it's an appointment...
If ActiveExplorer.Selection.Count = 1 And _
ActiveExplorer.Selection.Item(1).Class = olAppointment Then

Set ai = ActiveExplorer.Selection.Item(1)
'go through the various properties and output them
With ai
'build a string with the meeting summary
tempstring = tempstring & .Start & Chr(13)
tempstring = tempstring & .End & Chr(13)
tempstring = tempstring & .Organizer & Chr(13)
tempstring = tempstring & .Recipients.Count & Chr(13)
End With

'add to the string a recipient response list
For Each r In ai.Recipients
tempstring = tempstring & r.Name & Chr(9)
tempstring = tempstring & r.MeetingResponseStatus & Chr(13)
Next
'a message box with the recipient responses
MsgBox tempstring
End If
End Sub

Alasbabylon
03-23-2005, 09:06 AM
I think I know what you are talking about, but I don't really know how to get there. The macr works GREAT, by the way, except that I don't know how to make it go to a word or text file, or even into an e-mail message. And how do I change the 0 to Nne, 2 to Tentative, 3 to Accepted, and 4 to Declined?

sandam
03-23-2005, 09:31 AM
This should sort the changing of the numbers.

Andrew ;?


Sub MeetingInfo()
Dim ai As Outlook.AppointmentItem
Dim tempstring As String
Dim r As Recipient

'if there is one item selected and it's an appointment...
If ActiveExplorer.Selection.Count = 1 And _
ActiveExplorer.Selection.Item(1).Class = olAppointment Then

Set ai = ActiveExplorer.Selection.Item(1)
'go through the various properties and output them
With ai
'build a string with the meeting summary
tempstring = tempstring & .Start & Chr(13)
tempstring = tempstring & .End & Chr(13)
tempstring = tempstring & .Organizer & Chr(13)
tempstring = tempstring & .Recipients.Count & Chr(13)
End With

'add to the string a recipient response list
For Each r In ai.Recipients
tempstring = tempstring & r.Name & Chr(9)
Select Case r.MeetingResponseStatus
Case 0
tempstring = tempstring & "None" & Chr(13)
Case 2
tempstring = tempstring & "Tentative" & Chr(13)
Case 3
tempstring = tempstring & "Accepted" & Chr(13)
Case 4
tempstring = tempstring & "Declined" & Chr(13)
End Select
Next
'a message box with the recipient responses
MsgBox tempstring
End If

End Sub

Killian
03-23-2005, 09:40 AM
Hi again,
I've changed the code to use "select case" to give a text result for the status and it now outputs a text file for you to open in Word (which you could also automate, if you feel it's nessecary)Sub MeetingInfo()
Dim ai As Outlook.AppointmentItem
Dim tempstring As String
Dim r As Recipient
Dim mrs As String
Dim fs As Object
Dim a
'if there is one item selected and it's an appointment...
If ActiveExplorer.Selection.Count = 1 And _
ActiveExplorer.Selection.Item(1).Class = olAppointment Then
Set ai = ActiveExplorer.Selection.Item(1)
'go through the various properties and output them
With ai
'build a string with the meeting summary
tempstring = tempstring & "Start time: " & .Start & Chr(13)
tempstring = tempstring & "Organizer: " & .Organizer & Chr(13)
tempstring = tempstring & "Number of attendees: " & .Recipients.Count & Chr(13) & Chr(13)
End With
'add to the string a recipient response list
For Each r In ai.Recipients
Select Case r.MeetingResponseStatus
Case olResponseAccepted
mrs = "Accepted"
Case olResponseDeclined
mrs = "Declined"
Case olResponseNone
mrs = "None"
Case olResponseNotResponded
mrs = "Responded"
Case olResponseOrganized
mrs = "Organized"
Case olResponseTentative
mrs = "Tentative"
End Select
tempstring = tempstring & r.Name & Chr(9)
tempstring = tempstring & mrs & Chr(13)
Next
'save result as a text file
Set fs = CreateObject("Scripting.FileSystemObject")
'!!!~~~you might want to change the path and name here~~~!!!
Set a = fs.CreateTextFile("c:\meetinglist.txt", True)
a.WriteLine tempstring
a.Close
End If
End Sub

Got there first Andrew :hi:

Alasbabylon
03-23-2005, 10:00 AM
AWESOME! I changed the location line to C:\Documents and Settings\maa5906\My Documents\AAA\meetinglist.doc and I got exactly what I needed! Thanks so much! You foilks are FANTASTIC!