Printing off responses to Meeting Requests

L

Lynn Brown

Good Day
I know that in older versions of Outlook, when you would print off a
meeting, it would also print off all the responses to the meeting, so that
you knew who was planning on attending, and who couldn't. You can see the
responses, but this no longer prints off in Outlook 2003. Does anybody know
of a switch or code that can be turned on so that this will start working?
 
N

Nikki Peterson

http://www.slipstick.com/addins/gallery/index.htm#myolcal
"My Outlook Calendar: Customizable Word template for generating
Outlook weekly and monthly calendars. Print any Outlook calendar
that you have access to, including calendars from other users'
mailboxes and Public Folders. Add color coding by category or by
type of item (one-day event, multiple-day event, etc.) Specify time
and date formats and the title for the calendar. Slower than the
Microsoft template, but it does much more and follows progress in
the status bar."

Choose Weekly and select the "Show Meeting Attendees"
radio button.

OR... (I really like using this one):

If you are up to adding a "macro" to your Outlook
http://www.outlookcode.com/codedetail.aspx?id=37

However, it is kinda advanced.

I'll try to write the steps if you're up to giving it a go:

1) Copy all of the code in the BODY of the page (in the link above)
(The white box in the middle)
2) In Outlook, press your <ALT>+<F11>
This opens the Microsoft Visual Basic - VbaProject.OTM
3) On the menu select "Insert"
4) Select "Module"
5) In the blank window on the right, PASTE the code you
copied
6) Select "File"
7) Select "Close and Return to Microsoft Outlook"
8) Right click on your Tool menu (in the gray part where the buttons are)
9) Select "Customize..."
10) Click on the "Commands" tab
11) Select "Macros" from the Categories
12) Click on "Project1.PrintAapptAttendee" and drag it to your toolbar
and Drop it (You have to drop it ON the toolbar not in the gray
blank area but next to something like the yellow question mark icon)
13) Close the Customize window.

Now try to use this "Macro"

1) Open an appointment that has attendees in it
2) Click on the "Project1.PrintAapptAttendee" button that you put
on your toolbar.
3) Wait a moment for Word to open and show you your appointment
with all of the attendees and how they responded to the invitation.

If you run into any problems, write back.

Nikki

Good Day
I know that in older versions of Outlook, when you would print off a
meeting, it would also print off all the responses to the meeting, so that
you knew who was planning on attending, and who couldn't. You can see the
responses, but this no longer prints off in Outlook 2003. Does anybody know
of a switch or code that can be turned on so that this will start working?
 
L

Lynn Brown

The first part prints off a calendar and it shows who was invited, but it
didn't show the responses.

I created the Macro, and followed your steps. I get an error:
"Compile Error:
User-defined type not defined"
When I press the Okay button, it takes me to the following line of code:
"Dim objWord as Word.Application"

I prefer this Macro choice, as when I get it working, I will put it on other
computers (for my bosses who actually want this info). Any suggestions why
the code wouldn't work. I followed your instructions.

Thanks for your help so far, but if I could get this to work, it would be
great.
 
N

Nikki Peterson

Here is what I have:

Dim objApp As Outlook.Application
Dim objItem As Object
Dim objSelection As Selection
Dim objAttendees As Outlook.Recipients
Dim objAttendeeReq As String
Dim objAttendeeOpt As String
Dim objOrganizer As String
Dim dtStart As Date
Dim dtEnd As Date
Dim dtCreate As Date
Dim strSubject As String
Dim strLocation As String
Dim strNotes As String
Dim strMeetStatus As String
Dim strUnderline As String ' Horizontal divider line

'added by Hugh
Dim x
Dim myMailItem
Dim strNoteBody

Dim iAccepted As Integer
Dim iDeclined As Integer
Dim iTentative As Integer

'to add office location
Dim strInvitee

'to gather office info from AD
Dim strLDAP
Dim strADOffice
Dim strADAddress
Dim strADCity
Dim strADState
Dim strADCountry
Dim strADPhone

'to check the invitee is a user
Dim myRecipient

'define hjs variables
iAccepted = 0
iDeclined = 0
iTentative = 0

Set objApp = CreateObject("Outlook.Application")
Set objItem = objApp.ActiveInspector.CurrentItem
Set objSelection = objApp.ActiveExplorer.Selection
Set objAttendees = objItem.Recipients

strUnderline = String(60, "_") ' use 60 underline characters

On Error GoTo EndClean:

' check for user problems with none or too many items open
Select Case objSelection.Count
Case 0
MsgBox "No appointment was opened. Please open the appointment to
print."
GoTo EndClean:
Case Is > 1
MsgBox "Too many items were selected. Just select one!!!"
GoTo EndClean:
End Select

' Is it an appointment
If objItem.Class <> 26 Then
MsgBox "This feature only works on items in your Calendar. Open an
Appointment and try again.", _
vbExclamation, _
"Not an Appointment"
GoTo EndClean:
End If

' Get the data
dtCreate = objItem.CreationTime
dtStart = objItem.Start
dtEnd = objItem.End
strSubject = objItem.Subject
strLocation = objItem.Location
strNotes = objItem.Body
objOrganizer = objItem.Organizer
objAttendeeReq = ""
objAttendeeOpt = ""

' Get The Attendee List
For x = 1 To objAttendees.Count
strMeetStatus = ""
Select Case objAttendees(x).MeetingResponseStatus
Case 0
If objAttendees(x).Name = objItem.Organizer Then
strMeetStatus = "Organizer"
Else
strMeetStatus = "No Response"
End If
Case 1
strMeetStatus = "Organizer"
Case 2
strMeetStatus = "Tentative"
iTentative = iTentative + 1
Case 3
strMeetStatus = "Accepted"
iAccepted = iAccepted + 1
Case 4
strMeetStatus = "Declined"
iDeclined = iDeclined + 1
End Select

strInvitee = objAttendees(x).Address

sbRetrieveADInfo strInvitee, strADOffice, strADAddress, strADCity,
strADState, strADCountry, strADPhone

'Debug.Print strADOffice & "~" & strADAddress & "~" & strADCity & "~" &
strADState & "~" & strADCountry & "~" & strADPhone
If strADAddress <> "" Then
strADAddress = "(" & strADAddress & ")"
Else
strADAddress = "&nbsp;"
End If

If strADPhone = "" Then
strADPhone = "&nbsp;"
End If

If objAttendees(x).Type = olRequired Then
objAttendeeReq = objAttendeeReq & objAttendees(x).AddressEntry & vbTab
& strADAddress & vbTab & strADPhone & vbTab & strMeetStatus & vbCr
Else
objAttendeeOpt = objAttendeeOpt & objAttendees(x).AddressEntry & vbTab
& strADAddress & vbTab & strADPhone & vbTab & strMeetStatus & vbCr
End If

strADOffice = ""
strADAddress = ""
strADCity = ""
strADState = ""
strADCountry = ""
strADPhone = ""

Next

''use Outlook instead

Set myMailItem = objApp.CreateItem(olMailItem)

myMailItem.Subject = "Attendee List for ~ " & strSubject & " ~ !Print Then
Discard!"
'begin building body of item
'html headers
strNoteBody = "<html><body><br>"
'html first table
strNoteBody = strNoteBody & "<Table>"
strNoteBody = strNoteBody & "<TR><TD><B>" & "Subject:" &
"</B></TD><TD><B>" & strSubject & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Organizer:" & "</TD><TD>" &
objOrganizer & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Location:" & "</TD><TD>" &
strLocation & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Start:" & "</TD><TD>" &
dtStart & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "End:" & "</TD><TD>" & dtEnd &
"</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Created:" & "</TD><TD>" &
dtCreate & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close first table

'second table counting responses
strNoteBody = strNoteBody & "<Table>"
strNoteBody = strNoteBody & "<TR><TD>" & _
"Accepted - " & iAccepted & "</TD><TD>" & _
"Declined - " & iDeclined & "</TD><TD>" & _
"Tentative - " & iTentative & "</TD><TD>"
strNoteBody = strNoteBody & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close table

'third table of required attendee responses details
strNoteBody = strNoteBody & "<P>" & "Required:" & "</P>"
'convert responses to a table
strNoteBody = strNoteBody & "<Table cellpadding=5 border=1>"
strNoteBody = strNoteBody & "<TR><TD>"
'Create headings for response table
strNoteBody = strNoteBody &
"Name</TD><TD>Location</TD><TD>Telephone</TD><TD>Response</TD><TR><TD>"
'remove trailing vbcrlf from object before creating html table
objAttendeeReq = Left(objAttendeeReq, Len(objAttendeeReq) - 1)
'Convert vbCrLf to html tags
objAttendeeReq = Replace(objAttendeeReq, vbCrLf, "<BR>")
'Convert vbCr to html tags
objAttendeeReq = Replace(objAttendeeReq, vbCr, "</TD><TR><TD>")
'convert vbTab to html tags
objAttendeeReq = Replace(objAttendeeReq, vbTab, "</TD><TD>")
strNoteBody = strNoteBody & objAttendeeReq
strNoteBody = strNoteBody & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close table

'4th table of Optional attendee responses details
strNoteBody = strNoteBody & "<P>" & "Optional:" & "</P>"

If objAttendeeOpt = "" Then
'do nothing
Else
'convert responses to a table
strNoteBody = strNoteBody & "<Table cellpadding=5 border=1>"
strNoteBody = strNoteBody & "<TR><TD>"
'Create headings for response table
strNoteBody = strNoteBody &
"Name</TD><TD>Location</TD><TD>Telephone</TD><TD>Response</TD><TR><TD>"
'remove trailing vbcrlf from object before creating html table
objAttendeeOpt = Left(objAttendeeOpt, Len(objAttendeeOpt) - 1)
'Convert vbCrLf to html tags
objAttendeeOpt = Replace(objAttendeeOpt, vbCrLf, "<BR>")
'Convert vbCr to html tags
objAttendeeOpt = Replace(objAttendeeOpt, vbCr, "</TD><TR><TD>")
'convert vbTab to html tags
objAttendeeOpt = Replace(objAttendeeOpt, vbTab, "</TD><TD>")
strNoteBody = strNoteBody & objAttendeeOpt
strNoteBody = strNoteBody & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close table
End If

'insert horizontal line before notes
strNoteBody = strNoteBody & "<HR>"

'insert notes
'Convert vbCrLf to html tags
strNotes = Replace(strNotes, vbCrLf, "<BR>")
strNotes = Replace(strNotes, vbTab, "&nbsp;&nbsp;&nbsp;&nbsp;")
strNoteBody = strNoteBody & "<P>" & "NOTES:" & "</P>"
strNoteBody = strNoteBody & strNotes

'close html
strNoteBody = strNoteBody & "</BODY>"
strNoteBody = strNoteBody & "</HTML>"

'transfer text to body of item
myMailItem.HTMLBody = strNoteBody

'reveal note to user
myMailItem.Display

'Now send it to the Printer
'myMailItem.PrintOut

'' end outlook

EndClean:
Set objApp = Nothing
Set objItem = Nothing
Set objSelection = Nothing
Set objAttendees = Nothing

End Sub



The first part prints off a calendar and it shows who was invited, but it
didn't show the responses.

I created the Macro, and followed your steps. I get an error:
"Compile Error:
User-defined type not defined"
When I press the Okay button, it takes me to the following line of code:
"Dim objWord as Word.Application"

I prefer this Macro choice, as when I get it working, I will put it on other
computers (for my bosses who actually want this info). Any suggestions why
the code wouldn't work. I followed your instructions.

Thanks for your help so far, but if I could get this to work, it would be
great.
 
N

Nikki Peterson

You know, it's been a while since I diddled with this and
I remember getting that same error. It seems as if I just removed the
"As String" part after each DIM OBJ... and that did the trick.

Nikki

Here is what I have:

Dim objApp As Outlook.Application
Dim objItem As Object
Dim objSelection As Selection
Dim objAttendees As Outlook.Recipients
Dim objAttendeeReq As String
Dim objAttendeeOpt As String
Dim objOrganizer As String
Dim dtStart As Date
Dim dtEnd As Date
Dim dtCreate As Date
Dim strSubject As String
Dim strLocation As String
Dim strNotes As String
Dim strMeetStatus As String
Dim strUnderline As String ' Horizontal divider line

'added by Hugh
Dim x
Dim myMailItem
Dim strNoteBody

Dim iAccepted As Integer
Dim iDeclined As Integer
Dim iTentative As Integer

'to add office location
Dim strInvitee

'to gather office info from AD
Dim strLDAP
Dim strADOffice
Dim strADAddress
Dim strADCity
Dim strADState
Dim strADCountry
Dim strADPhone

'to check the invitee is a user
Dim myRecipient

'define hjs variables
iAccepted = 0
iDeclined = 0
iTentative = 0

Set objApp = CreateObject("Outlook.Application")
Set objItem = objApp.ActiveInspector.CurrentItem
Set objSelection = objApp.ActiveExplorer.Selection
Set objAttendees = objItem.Recipients

strUnderline = String(60, "_") ' use 60 underline characters

On Error GoTo EndClean:

' check for user problems with none or too many items open
Select Case objSelection.Count
Case 0
MsgBox "No appointment was opened. Please open the appointment to
print."
GoTo EndClean:
Case Is > 1
MsgBox "Too many items were selected. Just select one!!!"
GoTo EndClean:
End Select

' Is it an appointment
If objItem.Class <> 26 Then
MsgBox "This feature only works on items in your Calendar. Open an
Appointment and try again.", _
vbExclamation, _
"Not an Appointment"
GoTo EndClean:
End If

' Get the data
dtCreate = objItem.CreationTime
dtStart = objItem.Start
dtEnd = objItem.End
strSubject = objItem.Subject
strLocation = objItem.Location
strNotes = objItem.Body
objOrganizer = objItem.Organizer
objAttendeeReq = ""
objAttendeeOpt = ""

' Get The Attendee List
For x = 1 To objAttendees.Count
strMeetStatus = ""
Select Case objAttendees(x).MeetingResponseStatus
Case 0
If objAttendees(x).Name = objItem.Organizer Then
strMeetStatus = "Organizer"
Else
strMeetStatus = "No Response"
End If
Case 1
strMeetStatus = "Organizer"
Case 2
strMeetStatus = "Tentative"
iTentative = iTentative + 1
Case 3
strMeetStatus = "Accepted"
iAccepted = iAccepted + 1
Case 4
strMeetStatus = "Declined"
iDeclined = iDeclined + 1
End Select

strInvitee = objAttendees(x).Address

sbRetrieveADInfo strInvitee, strADOffice, strADAddress, strADCity,
strADState, strADCountry, strADPhone

'Debug.Print strADOffice & "~" & strADAddress & "~" & strADCity & "~" &
strADState & "~" & strADCountry & "~" & strADPhone
If strADAddress <> "" Then
strADAddress = "(" & strADAddress & ")"
Else
strADAddress = "&nbsp;"
End If

If strADPhone = "" Then
strADPhone = "&nbsp;"
End If

If objAttendees(x).Type = olRequired Then
objAttendeeReq = objAttendeeReq & objAttendees(x).AddressEntry & vbTab
& strADAddress & vbTab & strADPhone & vbTab & strMeetStatus & vbCr
Else
objAttendeeOpt = objAttendeeOpt & objAttendees(x).AddressEntry & vbTab
& strADAddress & vbTab & strADPhone & vbTab & strMeetStatus & vbCr
End If

strADOffice = ""
strADAddress = ""
strADCity = ""
strADState = ""
strADCountry = ""
strADPhone = ""

Next

''use Outlook instead

Set myMailItem = objApp.CreateItem(olMailItem)

myMailItem.Subject = "Attendee List for ~ " & strSubject & " ~ !Print Then
Discard!"
'begin building body of item
'html headers
strNoteBody = "<html><body><br>"
'html first table
strNoteBody = strNoteBody & "<Table>"
strNoteBody = strNoteBody & "<TR><TD><B>" & "Subject:" &
"</B></TD><TD><B>" & strSubject & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Organizer:" & "</TD><TD>" &
objOrganizer & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Location:" & "</TD><TD>" &
strLocation & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Start:" & "</TD><TD>" &
dtStart & "</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "End:" & "</TD><TD>" & dtEnd &
"</TR>"
strNoteBody = strNoteBody & "<TR><TD>" & "Created:" & "</TD><TD>" &
dtCreate & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close first table

'second table counting responses
strNoteBody = strNoteBody & "<Table>"
strNoteBody = strNoteBody & "<TR><TD>" & _
"Accepted - " & iAccepted & "</TD><TD>" & _
"Declined - " & iDeclined & "</TD><TD>" & _
"Tentative - " & iTentative & "</TD><TD>"
strNoteBody = strNoteBody & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close table

'third table of required attendee responses details
strNoteBody = strNoteBody & "<P>" & "Required:" & "</P>"
'convert responses to a table
strNoteBody = strNoteBody & "<Table cellpadding=5 border=1>"
strNoteBody = strNoteBody & "<TR><TD>"
'Create headings for response table
strNoteBody = strNoteBody &
"Name</TD><TD>Location</TD><TD>Telephone</TD><TD>Response</TD><TR><TD>"
'remove trailing vbcrlf from object before creating html table
objAttendeeReq = Left(objAttendeeReq, Len(objAttendeeReq) - 1)
'Convert vbCrLf to html tags
objAttendeeReq = Replace(objAttendeeReq, vbCrLf, "<BR>")
'Convert vbCr to html tags
objAttendeeReq = Replace(objAttendeeReq, vbCr, "</TD><TR><TD>")
'convert vbTab to html tags
objAttendeeReq = Replace(objAttendeeReq, vbTab, "</TD><TD>")
strNoteBody = strNoteBody & objAttendeeReq
strNoteBody = strNoteBody & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close table

'4th table of Optional attendee responses details
strNoteBody = strNoteBody & "<P>" & "Optional:" & "</P>"

If objAttendeeOpt = "" Then
'do nothing
Else
'convert responses to a table
strNoteBody = strNoteBody & "<Table cellpadding=5 border=1>"
strNoteBody = strNoteBody & "<TR><TD>"
'Create headings for response table
strNoteBody = strNoteBody &
"Name</TD><TD>Location</TD><TD>Telephone</TD><TD>Response</TD><TR><TD>"
'remove trailing vbcrlf from object before creating html table
objAttendeeOpt = Left(objAttendeeOpt, Len(objAttendeeOpt) - 1)
'Convert vbCrLf to html tags
objAttendeeOpt = Replace(objAttendeeOpt, vbCrLf, "<BR>")
'Convert vbCr to html tags
objAttendeeOpt = Replace(objAttendeeOpt, vbCr, "</TD><TR><TD>")
'convert vbTab to html tags
objAttendeeOpt = Replace(objAttendeeOpt, vbTab, "</TD><TD>")
strNoteBody = strNoteBody & objAttendeeOpt
strNoteBody = strNoteBody & "</TR>"
strNoteBody = strNoteBody & "</TABLE>"
'close table
End If

'insert horizontal line before notes
strNoteBody = strNoteBody & "<HR>"

'insert notes
'Convert vbCrLf to html tags
strNotes = Replace(strNotes, vbCrLf, "<BR>")
strNotes = Replace(strNotes, vbTab, "&nbsp;&nbsp;&nbsp;&nbsp;")
strNoteBody = strNoteBody & "<P>" & "NOTES:" & "</P>"
strNoteBody = strNoteBody & strNotes

'close html
strNoteBody = strNoteBody & "</BODY>"
strNoteBody = strNoteBody & "</HTML>"

'transfer text to body of item
myMailItem.HTMLBody = strNoteBody

'reveal note to user
myMailItem.Display

'Now send it to the Printer
'myMailItem.PrintOut

'' end outlook

EndClean:
Set objApp = Nothing
Set objItem = Nothing
Set objSelection = Nothing
Set objAttendees = Nothing

End Sub



The first part prints off a calendar and it shows who was invited, but it
didn't show the responses.

I created the Macro, and followed your steps. I get an error:
"Compile Error:
User-defined type not defined"
When I press the Okay button, it takes me to the following line of code:
"Dim objWord as Word.Application"

I prefer this Macro choice, as when I get it working, I will put it on other
computers (for my bosses who actually want this info). Any suggestions why
the code wouldn't work. I followed your instructions.

Thanks for your help so far, but if I could get this to work, it would be
great.
 
N

Nikki Peterson

That's it, you need to edit the text as follows:

WAS:

' Set up Word
Dim objWord As Word.Application
Dim objdoc As Word.Document
Dim wordRng As Word.Range
Dim wordPara As Word.Paragraph

CHANGE TO:

' Set up Word
Dim objWord
Dim objdoc
Dim wordRng
Dim wordPara

Nikki
(Just ignore the other I sent...)

The first part prints off a calendar and it shows who was invited, but it
didn't show the responses.

I created the Macro, and followed your steps. I get an error:
"Compile Error:
User-defined type not defined"
When I press the Okay button, it takes me to the following line of code:
"Dim objWord as Word.Application"

I prefer this Macro choice, as when I get it working, I will put it on other
computers (for my bosses who actually want this info). Any suggestions why
the code wouldn't work. I followed your instructions.

Thanks for your help so far, but if I could get this to work, it would be
great.
 
L

Lynn Brown

Thanks. That last fix did the job. Now I just need to wait until Monday to
see if my network system will allow the Macro to stay, or do I need to keep
on creating it every morning (which isn't a big deal. It takes 30 seconds
for me to do it, now that you have given me the code).
Do you know/have you hear if Microsoft will be putting a patch in that will
fix this problem in their system or did they not see a need for this useful
option?
Again thanks for the help and the quick reply.
Lynn
 
N

Nikki Peterson

I do not know if MS plans to give us this option. However, I agree
it sure would be a nice thing if they did.

Nikki

Thanks. That last fix did the job. Now I just need to wait until Monday to
see if my network system will allow the Macro to stay, or do I need to keep
on creating it every morning (which isn't a big deal. It takes 30 seconds
for me to do it, now that you have given me the code).
Do you know/have you hear if Microsoft will be putting a patch in that will
fix this problem in their system or did they not see a need for this useful
option?
Again thanks for the help and the quick reply.
Lynn
 
L

Lynn Brown

Nikki
Thanks again for the help. I was glad to see that the Macro was still there
this morning, but when I opened a meeting request to print it, it doesn't
work. ANy suggestions?
Lynn
 
N

Nikki Peterson

You need to make sure that both Outlook and MS Word have the
MACRO Security Relaxed enough to use it.

Check your Security settings on both programs.

Nikki

Nikki
Thanks again for the help. I was glad to see that the Macro was still there
this morning, but when I opened a meeting request to print it, it doesn't
work. ANy suggestions?
Lynn
 
L

Lynn Brown

Thanks for all your help NIkki. I am working with our help desk now to
ensure that I can keep this working.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top