When you attach an MSG file, Outlook is "smart" enough to convert it into an
embedded message attachment.
When you save a message as an MSG file (which is an OLe storage file), it
includes a date/time stamp. Plus teh order in which teh proeprties are
stored might be different.
The best you can do is to calculate the hash of the various message
properties (Subject, Body, etc).
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"xadeqd" <(E-Mail Removed)> wrote in message
news:2DFF39AD-67C8-4365-836D-(E-Mail Removed)...
>I have this scenario- I have a .MSG email, and attached is a .JPG and
> another .MSG. I want to save these attachments and generate a hash value
> from
> the file binary. Usually not a problem, but I have encountered some
> strange
> behavior when saving attached MSGs.
>
> No matter how many times I save the .JPG file, the resulting file's binary
> is always the same, which is great. However when I save the .MSG file the
> binary is slightly different every time. Is there a way through outlook,
> outlook API, or any other means, to save an attached MSG as the same
> binary
> file that it was when it was originally attached to the MSG?
>
> Any help appreciated
> Thanks