mapi attachment problem

C

Chuck Bohling

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?
 
D

Dmitry Streblechenko

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
 
H

Henry Gusakovsky

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top