![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I'm writing an Outlook Add-in to link calendar appointments with room
bookings in our room and resources booking application. I need to store a room booking reference with the calendar appointment so that if they move or delete the appointment I can move or delete the room booking. I don't want to use the outlook item user properties as this makes the appointment a "one-off" non-standard item. I tried using the globalObjId MAPI property (because I noticed this is where Outlook stores the UID when an iCal or vCal is received). But Outlook (or something) changes this property from time to time and I lose my reference. I tried creating a named property and this is OK unless the user deletes an appointment using the right mouse button menu. In this case I catch the Item_Add event in the Deleted Items folder but when I look in the MAPIObject my named property has dissappeared. Do named properties get lost when items are moved from folder to folder? Is there any safe place I can store my booking reference? |
Ads |
#2
|
|||
|
|||
![]()
Both UserProperties and MAPI named properties on items should remain on
those items even if they're moved. I also don't see why creating a UserProperty would one-off an item unless the item is using a custom form. Once a global ObjectID property is assigned to an item it's supposed to not change, that's the entire purpose of that property. Since EntryID may change when an item is moved or deleted, depending on the store provider, that property was created to allow tracking of changed meetings and appointments despite EntryID changes. -- 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 "AlanGlover" wrote in message ... I'm writing an Outlook Add-in to link calendar appointments with room bookings in our room and resources booking application. I need to store a room booking reference with the calendar appointment so that if they move or delete the appointment I can move or delete the room booking. I don't want to use the outlook item user properties as this makes the appointment a "one-off" non-standard item. I tried using the globalObjId MAPI property (because I noticed this is where Outlook stores the UID when an iCal or vCal is received). But Outlook (or something) changes this property from time to time and I lose my reference. I tried creating a named property and this is OK unless the user deletes an appointment using the right mouse button menu. In this case I catch the Item_Add event in the Deleted Items folder but when I look in the MAPIObject my named property has dissappeared. Do named properties get lost when items are moved from folder to folder? Is there any safe place I can store my booking reference? |
#3
|
|||
|
|||
![]()
Thanks for this.
I suppose the second paragraph means I shouldn't write to this property? The first para is a great help though I have clearly misunderstood something I read (or read some internet garbage), and it sounds like I can just use a user property. Will try that tomorrow. Thanks Alan "Ken Slovak - [MVP - Outlook]" wrote: Both UserProperties and MAPI named properties on items should remain on those items even if they're moved. I also don't see why creating a UserProperty would one-off an item unless the item is using a custom form. Once a global ObjectID property is assigned to an item it's supposed to not change, that's the entire purpose of that property. Since EntryID may change when an item is moved or deleted, depending on the store provider, that property was created to allow tracking of changed meetings and appointments despite EntryID changes. -- 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 "AlanGlover" wrote in message ... I'm writing an Outlook Add-in to link calendar appointments with room bookings in our room and resources booking application. I need to store a room booking reference with the calendar appointment so that if they move or delete the appointment I can move or delete the room booking. I don't want to use the outlook item user properties as this makes the appointment a "one-off" non-standard item. I tried using the globalObjId MAPI property (because I noticed this is where Outlook stores the UID when an iCal or vCal is received). But Outlook (or something) changes this property from time to time and I lose my reference. I tried creating a named property and this is OK unless the user deletes an appointment using the right mouse button menu. In this case I catch the Item_Add event in the Deleted Items folder but when I look in the MAPIObject my named property has dissappeared. Do named properties get lost when items are moved from folder to folder? Is there any safe place I can store my booking reference? |
#4
|
|||
|
|||
![]()
Writing to GlobalObjectID is a real good way to screw things up with
meetings and appointments. -- 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 "AlanGlover" wrote in message ... Thanks for this. I suppose the second paragraph means I shouldn't write to this property? The first para is a great help though I have clearly misunderstood something I read (or read some internet garbage), and it sounds like I can just use a user property. Will try that tomorrow. Thanks Alan |
#5
|
|||
|
|||
![]()
I still have problems I'm afraid. I am adding a userproperty when the user
saves a new appointment and setting its value with my user reference string. I can go to the saved appointment with Outlook Spy and my property is there and set correctly. I right click and delete the appointment. Go into the deleted items folder and open the item with Outlook Spy - the user property has gone - userproperties.count is 0. Alan "Ken Slovak - [MVP - Outlook]" wrote: Writing to GlobalObjectID is a real good way to screw things up with meetings and appointments. -- 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 "AlanGlover" wrote in message ... Thanks for this. I suppose the second paragraph means I shouldn't write to this property? The first para is a great help though I have clearly misunderstood something I read (or read some internet garbage), and it sounds like I can just use a user property. Will try that tomorrow. Thanks Alan |
#6
|
|||
|
|||
![]()
OK call off the rescue party! It seems I have to save the appointment item
again if I update the userproperties during the write event. The change does persist for a while so Outlook Spy shows it and that made me think it was saved OK, but it wasn't. "AlanGlover" wrote: I still have problems I'm afraid. I am adding a userproperty when the user saves a new appointment and setting its value with my user reference string. I can go to the saved appointment with Outlook Spy and my property is there and set correctly. I right click and delete the appointment. Go into the deleted items folder and open the item with Outlook Spy - the user property has gone - userproperties.count is 0. Alan "Ken Slovak - [MVP - Outlook]" wrote: Writing to GlobalObjectID is a real good way to screw things up with meetings and appointments. -- 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 "AlanGlover" wrote in message ... Thanks for this. I suppose the second paragraph means I shouldn't write to this property? The first para is a great help though I have clearly misunderstood something I read (or read some internet garbage), and it sounds like I can just use a user property. Will try that tomorrow. Thanks Alan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Cannot update the appointment because the corresponding item in the folder you syncronized does not match this item" | Stephen Corliss | Outlook - General Queries | 1 | June 26th 08 12:29 AM |
How to store new message item in Sent folder | Ivan | Add-ins for Outlook | 2 | June 1st 07 06:58 PM |
How to change an item from a recurring Appointment item to an exception from VB code? | Dikbill | Outlook and VBA | 2 | July 13th 06 08:45 AM |
Saving exception item in recurring appointment item fails | Dikbill | Outlook and VBA | 2 | July 11th 06 03:59 PM |
Saving exception item in recurring appointment item fails | Dikbill | Outlook - Calandaring | 0 | July 11th 06 02:01 PM |