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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Where to store a unique reference in an Appointment Item?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 4th 08, 12:23 PM posted to microsoft.public.outlook.program_addins
AlanGlover
external usenet poster
 
Posts: 11
Default Where to store a unique reference in an Appointment Item?

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  
Old September 4th 08, 01:53 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Where to store a unique reference in an Appointment Item?

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  
Old September 4th 08, 06:42 PM posted to microsoft.public.outlook.program_addins
AlanGlover
external usenet poster
 
Posts: 11
Default Where to store a unique reference in an Appointment Item?

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  
Old September 4th 08, 08:45 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Where to store a unique reference in an Appointment Item?

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  
Old September 5th 08, 03:24 PM posted to microsoft.public.outlook.program_addins
AlanGlover
external usenet poster
 
Posts: 11
Default Where to store a unique reference in an Appointment Item?

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  
Old September 5th 08, 03:37 PM posted to microsoft.public.outlook.program_addins
AlanGlover
external usenet poster
 
Posts: 11
Default Where to store a unique reference in an Appointment Item?

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
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
"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


All times are GMT +1. The time now is 05:59 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.