none
To create AppointmentItem with different (than current) organizer? RRS feed

  • Question

  • Is it possible to set meeting organizer? I have tried PR_RECIPIENT_FLAG on Recipient which property I can retrieve but I cannot set it. Is there any other way?
    Tuesday, May 17, 2011 10:00 AM

Answers

  • 1. You need to set the PR_RECIPIENT_FLAGS to 1 (sendable) + 2 (organizer) = 3. This can be done using RDORecipient.Fields[] in Redemption.

    2. You can also set the PR_SENDER_xys and PR_SENT_REPRESENTING_xyz properties. You can use either RDOAppointmentItem.Fields and set  the RDOAppointmentItem.Sender/SentOnbehalfOf properties to an RDOAddressEntry object.

    3. Set FInvited (DASL name http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8229000B) to true.

    4. Set AppointmentStateFlags (DASL name http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82170003) to 3 (olMeetingReceived)

    5. Set ResponseStatus (DASL name http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82180003) to 3 (olResponseAccepted)

     

    There might be some other properties that you can set, but these are what I can think of from looking at my code.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    • Marked as answer by TrekCZ Friday, May 20, 2011 12:31 PM
    Wednesday, May 18, 2011 4:40 AM
  • Thanks, this is too much work (coding in C++) or expensive solution (Redemption) for such a marginality. I solved it by (cheap solution) importing ics file.
    • Marked as answer by TrekCZ Friday, May 20, 2011 12:31 PM
    Wednesday, May 18, 2011 9:49 AM

All replies

  • The creator of the item is the organizer. You might be able to change that on the item using Extended MAPI or Redemption prior to the first save of the item, I've never tried that. It definitely cannot be changed at any time using the Outlook object model. If it doesn't work using Redemption or Extended MAPI before the first save then it can't be done.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "TrekCZ" <=?utf-8?B?VHJla0Na?=> wrote in message news:304a4e4f-afa8-4b57-97c4-f632e7b4e50f...
    Is it possible to set meeting organizer? I have tried PR_RECIPIENT_FLAG on Recipient which property I can retrieve but I cannot set it. Is there any other way?

    Ken Slovak MVP - Outlook
    Tuesday, May 17, 2011 1:55 PM
    Moderator
  • As Ken alludes to, barring some exotic manipulation via Extended MAPI potentially being able to do this (doubtful, but I do not know concretely that it is impossible), you will find no way to change the organizer. Organizer is a read-only property in Redemption's object model as well. 

    If you're feeling adventurous, you can learn about how the organizer property is represented within a meeting object as well as how it's used in various operations by referring to the [MS-OXOCAL] protocol specification (PDF link).

    One particular section of interest in that document is section 2.2.4.9.1 (PidTagRecipientFlags), where it mentions that the organizer appears to be identified as the RecipientRow that has the recipOrganizer (0x00000002) flag set.

    So if you were able to manipulate the individual RecipientRows of the meeting object, I believe you could effectively change the organizer by changing which RecipientRow had this flag. Sadly I have nothing to offer on how to get that level of access to the object, and I'm sure doing what I just described, if even possible, would result in unforeseen consequences if the object had already been saved (given the complexity of operations that make use of the organizer property).

    Tuesday, May 17, 2011 2:53 PM
  • Thanks, I already read that documentation and experimented with PidTagRecipientFlags (aka PR_RECIPIENT_FLAG). In Outlook object model it is possible to read this but I could not set it (not sure whether could not get correct url or that it is really read only). And issue is that as soon as item is created there is already organizer in Recipients collection.

    Tuesday, May 17, 2011 3:05 PM
  • I think it's a dead end myself, unless you can impersonate the desired user as a Redemption or Extended MAPI logon and then create the appointment as that user. And that might not be feasible if the MAPI on that machine is client-side MAPI and not server-side MAPI.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "TrekCZ" <=?utf-8?B?VHJla0Na?=> wrote in message news:5c39ecf8-ae26-4fbb-9d57-45a585f02dd4...

    Thanks, I already read that documentation and experimented with PidTagRecipientFlags (aka PR_RECIPIENT_FLAG). In Outlook object model it is possible to read this but I could not set it (not sure whether could not get correct url or that it is really read only). And issue is that as soon as item is created there is already organizer in Recipients collection.


    Ken Slovak MVP - Outlook
    Tuesday, May 17, 2011 3:22 PM
    Moderator
  • With Extended MAPI (or Redemption) it is possible to set the organizer to any user.

    What exactly are you trying to do? Just create an appointment in the Calendar folder as if it it came from a different user?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been

    Tuesday, May 17, 2011 5:44 PM
  • Yes, I want to reconstruct AppointmentItem from external data in Calendar folder. I want do this for now with Outlook obj model.

    ... i found crude workaround so it is ok
        now I need to know why respond send does not work when organizer is != current user (i.e. somebody else)


    Tuesday, May 17, 2011 7:02 PM
  • Of course it is possible to create an appoitment that looks like it came from somebody else either using straight MAPi or Redemption (which exposes all the pieces that you need to do that).

    That is how (MAPI) Outlook creates an appointment in your Calendar folder from a meeting invitation in your Inbox.

    I did this more than once, and it works just fine.

     


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Wednesday, May 18, 2011 4:19 AM
  • 1. You need to set the PR_RECIPIENT_FLAGS to 1 (sendable) + 2 (organizer) = 3. This can be done using RDORecipient.Fields[] in Redemption.

    2. You can also set the PR_SENDER_xys and PR_SENT_REPRESENTING_xyz properties. You can use either RDOAppointmentItem.Fields and set  the RDOAppointmentItem.Sender/SentOnbehalfOf properties to an RDOAddressEntry object.

    3. Set FInvited (DASL name http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8229000B) to true.

    4. Set AppointmentStateFlags (DASL name http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82170003) to 3 (olMeetingReceived)

    5. Set ResponseStatus (DASL name http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82180003) to 3 (olResponseAccepted)

     

    There might be some other properties that you can set, but these are what I can think of from looking at my code.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    • Marked as answer by TrekCZ Friday, May 20, 2011 12:31 PM
    Wednesday, May 18, 2011 4:40 AM
  • Thanks, this is too much work (coding in C++) or expensive solution (Redemption) for such a marginality. I solved it by (cheap solution) importing ics file.
    • Marked as answer by TrekCZ Friday, May 20, 2011 12:31 PM
    Wednesday, May 18, 2011 9:49 AM