View Single Post
  #4  
Old August 8th 06, 06:15 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption's SafeMailItem.SaveAs method yields empty files

Redemption does not add the message header when saving in the RTF format -
this is a current limitation.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Alexander Bub" ab(at)haessler(dot)com wrote in message
...
Dmitry,

"Dmitry Streblechenko" wrote in
...
Firstly, you need to call olMsg.Save after calling CreateItemFromTemplate
to make suree Redemption can see the latest changes.
Secondly, why do you use CreateItemFromTemplate, which strips out all the
sender related properties?
You can open an MSG file directly using MAPIUtils.GetItemFromMsgFile or
RDOSession.GetMessageFromMsgFile, then simply call
MessageItem/RDOMail.SaveAs.


Thank you. I tried both MAPIUtils.GetItemFromMsgFile and
RDOSession.GetMessageFromMsgFile. Both work perfectly well for html and
plain text e-mails. With RTF mails, the resulting RTF file still
contains only the body of the message, but no headers.

Is this by design or am I still doing something wrong? I tried to .save
the message before saving it as RTF, but that didn't help.

If you still need to import an MSG file to Outlook, you can use
Safe*Item/RDOMail.Import instead - all the sender related properties will
be preserved.


I don't need to import the messages to Outlook -- I just didn't know
another way of exporting it.

Thanks a lot in advance
Alexander



Ads