Attached MSG files change when saved

Status
Not open for further replies.
X

xadeqd

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
 
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)

-

"xadeqd" <xadeqd> wrote in message

news:2DFF39AD-67C8-4365-836D-E04E1C014572@microsoft.com...
> 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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A Copy attached MSG to Inbox in IMAP folder Outlook VBA and Custom Forms 1
B Outlook 2013 erratically deleting original file that is attached Using Outlook 0
P Insert link in email body to attached document in Outlook 365 Outlook VBA and Custom Forms 0
C Attached Files outlook 2010 Using Outlook 1
C Attached files on Outlook 2010 Sp1 & Exc 2013 are missing Exchange Server Administration 1
M attached images not showing in text area Exchange Server Administration 0
E What does mean this icon at the picture attached? Using Outlook 2
J Outlook emails attached to tasks Using Outlook 4
D Open attached CSV, copy newdata and paste it to database CSV Outlook VBA and Custom Forms 2
E Outlook VBA to print attached Pdf to a fax printer and assign fax number Using Outlook 0
I could not open attached files, i receive a message with “corrupted file” Using Outlook 0
R outlook freezes for 5 to 7 mininutes while send a file attached from netwrk dr Using Outlook 2
T Word attached files open Word. Excel files open Picture Manager!! Using Outlook 2
M outlook items attached show up blank Using Outlook 3
J importing contacts, data, emails and attached files from ACT 2009 BCM (Business Contact Manager) 1
A Select the position of an attached file in a HTML mailitem Outlook VBA and Custom Forms 1
B Can I install to a Network Attached Drive BCM (Business Contact Manager) 2
G Save emails as msg file from Outlook Web AddIn (Office JS) Outlook VBA and Custom Forms 0
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
R Saving Emails and Attachments as .msg file Using Outlook 3
S Problem Accessing .MSG Property 'ImageNaturalHeight' Tag '0x80010003' Outlook VBA and Custom Forms 1
J How to import many msg into different public folders in Outlook Outlook VBA and Custom Forms 7
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
G VBA to save selected Outlook msg with new name in selected network Windows folder Outlook VBA and Custom Forms 1
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
D Outlook 2016 Outlook Error Msg "The operation cannot be performed ..." How to Stop it Using Outlook 4
M Outlook 2016 msg attachments Using Outlook 0
R Sending email copy (*.msg file) of sent email if subject line contains specific string. Outlook VBA and Custom Forms 1
R Prompt asking the user to send email to folder as *.msg file Outlook VBA and Custom Forms 1
nathandavies Email Details to Excel & Save as .MSG on one macro - combination of 2 macros Outlook VBA and Custom Forms 3
J Outlook - 2013 - Error msg when copying folders from Online Archives to another user's mailbox Using Outlook 0
Diane Poremsky Save Selected Email Message as .msg File Using Outlook 11
I Outlook 2010, 2013 will not open .msg or .eml files Using Outlook.com accounts in Outlook 1
I Windows 10 - .msg files on disk show Explorer popup error Using Outlook 5
K Cannot consistently drag and drop .msg files into Outlook 2010 Using Outlook 0
Jessica .msg file saved in network drive appearing in Deleted Items folder Using Outlook 3
A Create message from .msg file Outlook VBA and Custom Forms 3
M Save selected email message as .msg file (with user to choose folder location) Outlook VBA and Custom Forms 14
M Can't open same msg file more than once at the same time in Outlook 2010 Using Outlook 7
Klaas "To Address" duplicated when moving msg to another folder Using Outlook 2
N Saving .msg as sent item on send Outlook VBA and Custom Forms 1
I Renamed msg file Using Outlook 3
F Cannot open extracted .msg files from outlook Outlook VBA and Custom Forms 1
A Moving .msg files back into outlook Using Outlook 2
B Outlook 2000 Rule to Move txt msg Not Working if size >24KB Using Outlook 3
A How to open .msg file from Hard disk folder? Using Outlook 3
P I am getting an error msg = cannot open file access denied Using Outlook 3
E Outlook 2007 Saves .MSG E-Mails with attachment from Public Folders as RTF Using Outlook 0
T Unable to open msg files in Outlook 2010 Using Outlook 11

Similar threads

Back
Top