Getting Responsestatus from MeetingItem

S

suffporter

Good Morning,

when sending a mail out of Outlook the OnItemSend Event is triggered:

procedure onitemsend(Sender : TOutlookApplication; const Item:
IDispatch; var Cancel: WordBool);

If the item is a MeetinItem is it possible to get to know from it how
the user has answered the meeting request(accept/decline/tentative)?

At the moment i fetch the appointment with .GetAssociatedAppointment
and there i take appointment.ResponseStatus. But for my purpose it
would be better to get it from the MeetingItem.
So is there a way to get the answer of the user?

Greets

Hans Schmidt
 
S

suffporter

Thank you very much for your answer.

There is just one problem when using it that way. If the user declines
the appointment there is no problem getting the assciated
appointment.
But when using appointment.ResponseStatus there comes the error
message that the appointment has moved or has been deleted.
Can i be sure if i set this in a try..except for example and the call
failes that the user declined that appointment?

Greets

Hans Schmidt
 
K

Ken Slovak - [MVP - Outlook]

No, you cannot assume that. You can use the GlobalObjectID property to
identify those items, that never changes no matter where an appointment is
moved to.
 
S

suffporter

I'm sorry, but where can i find the GlobalObjectID? In the Type
Library this property isn't defined? Does that mean that this is out-
dated?

Thank you in advance


Greets

Hans Schmidt
 
K

Ken Slovak - [MVP - Outlook]

That was exposed in the object model as GlobalAppointmentID in Outlook 2007.
In Outlook 2003 it's there for SP2 or later, but you have to use a lower
level API such as CDO 1.21 or Extended MAPI or Redemption
(www.dimastr.com/redemption) to get at it.

If you can't use a lower level API and aren't using Outlook 2007 then you'd
have to scan all appointments and look for matching characteristics such as
subject, start and end times, locations, etc.
 
S

suffporter

Good Morning,

i've bought Redemption some time ago and i'm using Extended Mapi :)
My problem is that after getting the reference to the associated
appointment
neither reading a property nor appitem.MAPIOBJECT.QueryInterface
(IID_IMessage,imsg)
works. So i have no chance to read the GlobalAppointmentID. What did i
do wrong?

Greets

Hans Schmidt
 
K

Ken Slovak - [MVP - Outlook]

For Extended MAPI code questions you are best off posting to the
microsoft.public.win32.programmer.messaging group, that's where the MAPI
experts hang out.

For Redemption how you access that property depends on how you are
instantiating or getting a reference to the appointment objects. Don't
forget that property is only there for Outlook 2003 SP2 or later.

Where it is there you would use:

GetIdsFromNames("{6ED8DA90-450B-101B-98DA-00AA003F1305}", 0x3) | PT_BINARY

to get the property tag, then you'd query the Fields collection of the
Redemption object to get that property.

To use it as a string ID value you'd need to convert the binary bytes into a
string, possibly using the MAPIUtils.HrArrayToString() method.
 

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