Re: Attachment from Forwarded Message Doesn't Show in Mail Form
- From: Jack Harris <jdharris@xxxxxxxxxxx>
- Date: Tue, 30 Sep 2008 13:50:11 -0700
Dmitry,
Why indeed. I changed the store to return the attachment from a call to
OpenAttach regardless of whether or not it had been commited to persistent
storage. I have it working now.
I'm still curious why the docs would say that the attachment should not be
available in the attachment table until the message has been commited, but
Outlook seems to expect it to be there before the message is saved.
Thanks
--
Jack Harris
"Dmitry Streblechenko" wrote:
Why do you need to save the *message* before a call to OpenAttach is made?.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Jack Harris" <jdharris@xxxxxxxxxxx> wrote in message
news:B1075F1F-D147-4187-9FD6-CC523BED8169@xxxxxxxxxxxxxxxx
This is a strange one - in our custom message store, when forwarding a
message that has attachments, the attachments do not show up in the new
Form. They are there and if you send the message the attachments are sent.
I've looked at this in the PST provider with Outlook Spy. The attachments
are in the attachment table for the message. In our store, they are not in
the attachment table.
According to the documentation for IMessage::CreateAttach(), attachments
should not be in the attachment table until IMapiProp::SaveChanges() is
called on both the message and the attachment and that's the way our store
is
coded. In our store, Outlook calls SaveChanges() on the attachment, but
not
on the message. That makes sense, as you wouldn't want to persist the
message
until the user either saves or sends the message.
I've tried to work around the problem by adding the attachment item to the
table when SaveChanges() is called on the attachment object. Outlook then
tries to call OpenAttach() on the message object, which fails because we
haven't saved the attachment object to storage yet.
Has anyone else run into this, or am I just doing it wrong?
--
Jack Harris
- References:
- Attachment from Forwarded Message Doesn't Show in Mail Form
- From: Jack Harris
- Re: Attachment from Forwarded Message Doesn't Show in Mail Form
- From: Dmitry Streblechenko
- Attachment from Forwarded Message Doesn't Show in Mail Form
- Prev by Date: MAPI: CustomForm and TransportDemo samples
- Previous by thread: Re: Attachment from Forwarded Message Doesn't Show in Mail Form
- Next by thread: Export as MIMI
- Index(es):
Relevant Pages
|