Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / March 2005

Tip: Looking for answers? Try searching our database.

mapi attachment problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chuck Bohling - 11 Mar 2005 20:25 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.