Tracking meeting request responses in Outlook

D

Dale Fye

I have cross posted this to the Access-General, Outlook-General, and
Outlook-programming-vba news groups to expand my pool of expertise.

I have a co-worker that wants to be able to print out the list of invitees
and threir responses to a meeting request (what is visible when you select
the "Show - Tracking" ribbon option in 2007. We cannot figure out a way to
print or even copy this info. He has more than two pages of invitees, and
would prefer not to do a screen print.

Any ideas?

Is this information visibile from within VBA? I linked my calendar to an
Access database, but did not see a field in the calendar table that seemed to
handle meeting attendees.
 
D

David C. Holley

Regardless of the fact that you're trying to do this within Access, this is
an Outlook Automation question and thus appropriate for the Outlook
newgroups. Automation is simply code within one application that reaches out
to work with another. Its irrelevant if you're using Access, Word, Excel or
Power Point, its all Outlook.

To that end.

Are you storing information in the Access database on the meeting? Where
does Access come into play with the Meeting Request? Are you creating the
Meeting Request in Access to begin with?

Yes it is entirely possible, but you're trying to do this from within Access
you have to locate the MeetingItem first. How you do that depends on how the
Meeting Request is being created to begin with as there are ways to do this
that are easier than others.
 
D

Dale Fye

Actually, Dave, I would prefer to do it in Outlook. But when I couldn't
figure out how to get a simple printout of the meeting request recipients and
their response, I went to Access (my area of expertise) to see whether I
could find a field in either the calendar or mail item collection that had
that information, but did not find one. Thats when I posted my note.
 
D

David C. Holley

What happens when you open the Meeting Item and click print? I seem to
recall that they meeting attendee status used to appear there.

David (hint)
 
D

Dale Fye

figured out how to get to the VBA editor but now:

I copied the code into a code module in Outlook 2007, and am getting an
error (287 Application-defined or object defined error) on the line:

Set objAttendees = objItem.Recipients

When I print objItem in the debug window, it gives me the subject of the
meeting.

objSelection.Class = 74

Any ideas?

I've got a meeting request that I created up on screen.

Dale


--
----
HTH
Dale
 
D

Dale Fye

It just prints the basic information (addressees, subject, dates/times, body
of the message.

Besides, he needs to get this into some form of Word or PPT document, so
being able to print it does not help!
 
D

Dale Fye

Thanks Sue,

I'm using the code from:http://www.outlookcode.com/codedetail.aspx?id=1418

Dim objApp As Outlook.Application
Dim objItem As Object
Dim objSelection As Selection
Dim objAttendees As Outlook.Recipients

....

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

objitem.class = 26

Since ObjItem is defined as an Object, there is no intellisense, so I'm out
of my element. Hell, the entire Outlook object model is "out of my element"!
;-)

I tried several different Outlook objects but each returned an error in
another area. I assume the reason this is declared as an object is that the
user could have any outlook object open when this code is run.
 
S

Sue Mosher [MVP]

Don't use this statement in Outlook VBA:

Set objApp = CreateObject("Outlook.Application")

Instead, use the intrinsic Application object:

Set objApp = Application

Once you check the Class property of the item, you can use the appropriate
object, e.g.

Dim objAppt as Outlook.AppointmentItem
'<snip>
Set objItem = objApp.ActiveInspector.CurrentItem
If objItem.Class = olAppointment Then
Set objAppt = objItem
Set objAttendees = objItem.Recipients
'etc.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
D

David C. Holley

It looks as if you're well on you're way to getting at the information, but
you also have to get it to print. I do not believe that Outlook has any sort
of inherent report functionality that you can customize.

But, in the same way that Outlook can be Automated, you can automate Word to
capture and format the information and then print it. Also, you should be
able to do it in such a way that it prints without the user ever knowning
that Word was invovled. When you get to that point, you'll want to hang out
in a Word newsgroup. I've done it myself but it was one time 5 years ago.
Not to difficult over all.
 
D

Dale Fye

Sue,

Still generates runtime error 287 (Application-defined or object-defined
error) at the final line of the code segment shown below.

Dim objApp As Application
Dim objItem As Outlook.AppointmentItem
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")

' Is it an appointment
If objApp.ActiveInspector.CurrentItem.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
Else
Set objItem = objApp.ActiveInspector.CurrentItem
End If

Set objSelection = objApp.ActiveExplorer.Selection
Set objAttendees = objItem.Recipients
 
D

Dale Fye

Dave,

I'm pretty familiar with Word automation, but the Outlook object model is
Greek to me. I think, with Sue's help, I'm gonna get this solved.

Thanks.
 
D

Dale Fye

Sorry,

I got a "D" in following instructions.

That did it. Thanks a lot for your patience.

How do I go about getting a discount on the book? ;-)

----
HTH
Dale
 

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