• Printing attendee availability (2000)

    Author
    Topic
    #388154

    I’d like to print an appointment from my calendar, showing the replies of the invitees (accepted, tentative, declined). It seems Outlook won’t do it on it’s own. Is there a way around that (besides MS’s suggestion to type it into the Notes of the appointment before printing)?

    –W

    Viewing 1 reply thread
    Author
    Replies
    • #985142

      I’m ‘piggybacking’ on this old post to ask if anyone knows if this rather large omission has been fixed by Microsoft in OL 2003. Anyone using 2003 that might know the answer? TIA, P.

      • #985514

        It has not. been fixed. (I hear your groan and second it.)

        • #985526

          Thanks for news John! Saints Preserve Us! Is anyone at Microsoft listening? I keep hoping that these omissions will be addressed each time there’s an update. Okay. Repeat after me, No, Virigina, there is no Microsoft Claus. disappointed

    • #680466

      (Edited by JohnBF on 11-Jul-08 16:00. )

      You could run this code to add the invitees and status to the meeting text. I have not extensively tested this, if you could test further and find problems, please post back. This code may trigger Outlooks’ Security Guard warning. The original code owed much to Sue Mosher, from Microsoft Outlook Programming, Digital Press, however it was truncated on a Lounge textbase restore, so this rewrite may or may not be her code (I’m certain it omits errorhandling Sue would code).

      Option Explicit

      Sub AddInviteeStatusToAppointmentBody()
      ‘ run from Outlook with the target appointment open
      Dim strAttendeeList As String, strMeetStatus As String, strOrganizer As String
      Dim intC As Integer

      If CBool(Inspectors.Count) Then
      With ActiveInspector.CurrentItem
      If .Class = olAppointment Then
      strOrganizer = .Organizer
      ‘ loop through Invitees
      For intC = 1 To .Recipients.Count
      With .Recipients(intC)
      ‘ get name and attendee type
      strAttendeeList = strAttendeeList & .Name & vbTab
      If .Type = olRequired Then
      strAttendeeList = strAttendeeList & “Required”
      Else
      strAttendeeList = strAttendeeList & “Optional”
      End If
      ‘ get response
      Select Case .MeetingResponseStatus
      Case olNone
      If .Name = strOrganizer Then
      strMeetStatus = “Organizer”
      Else
      strMeetStatus = “No Response”
      End If
      Case olResponseOrganized
      strMeetStatus = “Organizer”
      Case olResponseTentative
      strMeetStatus = “Tentative”
      Case olResponseAccepted
      strMeetStatus = “Accepted”
      Case olResponseDeclined
      strMeetStatus = “Declined”
      Case olResponseNotResponded
      strMeetStatus = “No Response”
      End Select
      strAttendeeList = strAttendeeList & vbTab & strMeetStatus & vbCrLf
      End With
      Next intC
      ‘ add list to Appointment text
      .Body = .Body & vbCrLf & vbCrLf & strAttendeeList
      .Save
      End If
      End With
      End If
      End Sub

      • #680671

        John,

        Thanks! That got me thinking and I tweaked it a bit so the info is organized and presented with the option to paste it into the notes, and resources are ignored (since I’m looking for people, not the rooms which automatically warn if they’re not available when the invitation is sent). I’d also like to figure out how to format the text (bold, underlined) so it’s a bit more presentable. But this works pretty nicely as it is.
        I tried to get a new menu item added to the Inspector but I’m unfamiliar with how that works. I’d like to add a button to one of the main toolbars on startup that would run the macro. I can get one in the explorer, but not the inspector.

        Here’s my modification of your posting.

        –W

        Public Function GetCurrentItem() As Object
        ‘ By Sue Mosher, from Microsoft Outlook Programming, Digital Press,

        • #680887

          Nice. I added my only custom button manually, in the e-mail window through Tools, Customize, Commands tab, Macros, drag the Macro to the Toolbar, and later pasting a custom button face over it. I didn’t try to automate the menu via commandbars, etc.

        • #681098

          I don’t think you can automate formatting within an appointment body. Below is an example of doing what you need, but automating Word to get the formatting capability. Thanks yet again to SueM – but any errors are my own:)

          Sub prnappt()
          ‘ Gather data from an opened appointment and print to
          ‘ Word. This provides a way to print the attendee list with their
          ‘ response, which Outlook will not do on its own.

          ‘ Set up Outlook
          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 strSubject As String
          Dim strLocation As String
          Dim strNotes As String
          Dim strMeetStatus As String
          Dim strUnderline As String ‘ Horizontal divider line

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

          On Error Resume Next

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

          Set objWord = GetObject(, “Word.application”)
          If objWord Is Nothing Then
          Set objWord = CreateObject(“word.application”)
          End If

          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 opten 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 “You First Need To open The Appointment to Print.”
          GoTo EndClean:
          End If

          ‘ Get the data
          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
          strMeetStatus = “No Response (or Organizer)”
          Case 1
          strMeetStatus = “Organizer”
          Case 2
          strMeetStatus = “Tentative”
          Case 3
          strMeetStatus = “Accepted”
          Case 4
          strMeetStatus = “Declined”
          End Select

          If objAttendees(x).Type = olRequired Then
          objAttendeeReq = objAttendeeReq & objAttendees(x).Name & vbTab & strMeetStatus & vbCr
          Else
          objAttendeeOpt = objAttendeeOpt & objAttendees(x).Name & vbTab & strMeetStatus & vbCr
          End If
          Next

          ‘ Word: Open a new doc and stuff it

          objWord.Visible = True
          Set objdoc = objWord.Documents.Add
          Set objdoc = objWord.ActiveDocument
          Set wordRng = objdoc.Range

          With wordRng
          .Font.Bold = True
          .Font.Italic = False
          .Font.Size = 14
          .InsertAfter “Organizer: ” & objOrganizer
          .InsertParagraphAfter
          .InsertAfter strUnderline
          .InsertParagraphAfter
          .InsertParagraphAfter
          End With

          Set wordPara = wordRng.Paragraphs(4)
          With wordPara.Range
          .Font.Bold = False
          .Font.Italic = False
          .Font.Size = 12
          .InsertAfter “Subject: ” & strSubject
          .InsertParagraphAfter
          .InsertAfter “Location: ” & strLocation
          .InsertParagraphAfter
          .InsertParagraphAfter
          .InsertAfter “Start: ” & dtStart
          .InsertParagraphAfter
          .InsertAfter “End: ” & dtEnd
          .InsertParagraphAfter
          .InsertParagraphAfter
          .InsertAfter “Required: ”
          .InsertParagraphAfter
          .InsertAfter objAttendeeReq
          .InsertParagraphAfter
          .InsertAfter “Optional: ”
          .InsertParagraphAfter
          .InsertAfter objAttendeeOpt
          .InsertParagraphAfter
          .InsertAfter strUnderline
          .InsertParagraphAfter
          .InsertAfter “NOTES”
          .InsertParagraphAfter
          .InsertAfter strNotes
          End With

          EndClean:
          Set objApp = Nothing
          Set objItem = Nothing
          Set objSelection = Nothing
          Set objAttendees = Nothing
          Set objWord = Nothing
          Set objdoc = Nothing
          Set wordRng = Nothing
          Set wordPara = Nothing

          End Sub

    Viewing 1 reply thread
    Reply To: Printing attendee availability (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: