I'm trying to update an exception to a calendar event using mapi. Exceptions
are stored as attachments to the owning event. With OpenAttach and
OpenProperty, I get an IMessage to the exception and appear to successfully
write to that object. But, even after SaveChanges to the exception and its
parent, the changes do not stick. Any idea what could be wrong? Do I need to
delete the original attachment and create a new one with my changes?
Dmitry Streblechenko - 14 Mar 2005 18:51 GMT
What is the code? Do you call SaveChanges on all 3 objects (embedded
message, attachment, parent message)?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
> I'm trying to update an exception to a calendar event using mapi.
> Exceptions are stored as attachments to the owning event. With OpenAttach
[quoted text clipped - 3 lines]
> wrong? Do I need to delete the original attachment and create a new one
> with my changes?
Chuck Bohling - 24 Mar 2005 19:17 GMT
No, I wasn't saving all 3 and after I did, the changes stuck.
> What is the code? Do you call SaveChanges on all 3 objects (embedded
> message, attachment, parent message)?
[quoted text clipped - 11 lines]
>> be wrong? Do I need to delete the original attachment and create a new
>> one with my changes?
Henry Gusakovsky - 15 Mar 2005 09:21 GMT
changing attachment is not enough.
You should change some undocummneted properties of the parent message.
that named propety is
GUID {00062002-0000-0000-C000-000000000046}
ID= 0x8216
type is PT_BINARY.
That property contains all info about recurrence and exceptions.
Attachment usually contain full text modification.
I mean that when you change body of the exception the state property will
contain only 255 bytes of that body.
Full body will be in the exception attachment.
see http://www.geocities.com/cainrandom/dev/MAPIRecurrence.html
for additional info.
WBR
Henry
> I'm trying to update an exception to a calendar event using mapi. Exceptions
> are stored as attachments to the owning event. With OpenAttach and
> OpenProperty, I get an IMessage to the exception and appear to successfully
> write to that object. But, even after SaveChanges to the exception and its
> parent, the changes do not stick. Any idea what could be wrong? Do I need to
> delete the original attachment and create a new one with my changes?