A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Getting Responsestatus from MeetingItem



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 11th 09, 08:11 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Getting Responsestatus from MeetingItem

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
Ads
  #2  
Old March 11th 09, 01:15 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting Responsestatus from MeetingItem

Use what you've been using, that's how to do it.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


wrote in message
...
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


  #3  
Old March 11th 09, 02:10 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Getting Responsestatus from MeetingItem

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
  #4  
Old March 11th 09, 02:24 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting Responsestatus from MeetingItem

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


wrote in message
...
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


  #5  
Old March 12th 09, 07:41 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Getting Responsestatus from MeetingItem

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
  #6  
Old March 12th 09, 02:49 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting Responsestatus from MeetingItem

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


wrote in message
...
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


  #7  
Old March 13th 09, 08:12 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Getting Responsestatus from MeetingItem

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
  #8  
Old March 13th 09, 03:08 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Getting Responsestatus from MeetingItem

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


wrote in message
...
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multivalue MeetingItem.ItemProperty zznw4m Outlook and VBA 1 July 6th 07 06:20 PM
Avoiding security pop up on MeetingItem.Respond/Send Nebuchenazarr Outlook and VBA 1 November 9th 06 12:50 AM


All times are GMT +1. The time now is 03:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.