0

I have a folder with content like this

More specific:

    __nameid_version1.0
        __substg1.0_00020102
        __substg1.0_00030102
        __substg1.0_00040102
        __substg1.0_10100102
    __substg1.0_001A001E
    __substg1.0_0037001E
    __substg1.0_10090102
    __substg1.0_3FF8001E
    __substg1.0_3FF90102
    __properties_version1.0
    __recip_version1.0_#00000000
        ...
    __attach_version1.0_#00000000
        ...
    __attach_version1.0_#00000001
        ...

This are files. With a little investigation I found that this is a message content of a outlook email.

It's posible to extract a msg file with 7zip ( I already try it).

How I can pack the compound files in msg file so I can open them with outlook?

Jordan Borisov
  • 1,603
  • 6
  • 34
  • 69

2 Answers2

1

.msg files are compound files.

You should use compound file library like Compound File .NET or MSG .NET

Steve
  • 11
  • 1
0

Do you mean you are trying to pack multiple messages into a single MSG file? You cannot do that.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • Here is some information so you can undestand the question http://msdn.microsoft.com/en-us/library/ee217698(v=exchg.80).aspx – Jordan Borisov Aug 23 '13 at 17:09
  • No, these are substorages in the main IStorage object - which is what an MSG file is - a compound OLE storage file. And this has absolutely nothing to do with any compression utilities or formats, such as 7zip, rar, zip. See IStorage object on MSDN. Are you just trying to extract data from an MSG file? You can either read it explicitly using Win API (StgOpenStorage etc., the MSG file format is documented), or use Redemption, it exposes RDOSession.GetMessageFromMsgFile method - http://www.dimastr.com/redemption/rdosession.htm – Dmitry Streblechenko Aug 23 '13 at 20:55
  • The MSG is already extracted. I want to pack it in MSG file again. – Jordan Borisov Aug 27 '13 at 19:15
  • What do you mean by "pack"? Do you mean you want to modify an existing MSG file? – Dmitry Streblechenko Aug 29 '13 at 16:35
  • No. With the program 7zip you can extract a MSG file. How I can archive it back to MSG file? – Jordan Borisov Sep 16 '13 at 13:27
  • MSG file is not an archive file. You cannot archive anything back to MSG. – Dmitry Streblechenko Sep 16 '13 at 14:00
  • I know that is not an archive. But please download 7zip program and extract MSG file. After this try to recoever it. :) – Jordan Borisov Sep 16 '13 at 14:07
  • I think you do not understand the question. – Jordan Borisov Sep 16 '13 at 14:07
  • Recover what? Are you trying to create an MSG file explicitly in your code? – Dmitry Streblechenko Sep 16 '13 at 14:28
  • I do not have a code. I'm just trying to find a way to recover the MSG file from the extracted old one. – Jordan Borisov Sep 16 '13 at 19:57
  • "Recover" in what sense? How was it damaged? – Dmitry Streblechenko Sep 17 '13 at 01:27
  • I mean restore the MSG file from the extracted one – Jordan Borisov Sep 17 '13 at 09:08
  • I am sorry, but I still have no idea what you mean. What is "extracted one"? Extracted from where? How? Why do you want to do that? What is the exact problem that you are trying to solve? – Dmitry Streblechenko Sep 17 '13 at 15:14
  • I have a MSG file which was extracted with 7zip. Do you understand now? – Jordan Borisov Sep 17 '13 at 15:21
  • Ok. And? What does it have to do with 7z? It would not care less what kind of file you store and extract. Is the MSG file damaged? – Dmitry Streblechenko Sep 17 '13 at 16:14
  • no the MSG file was extracted. How to pack it??? Read my question please and then ask your questions. – Jordan Borisov Sep 18 '13 at 09:09
  • Pack where? Do you want to create another 7z or zip file? I reread your question at least a dozen times. Sorry about not being a psychic, but I have absolutely no idea what "How I can pack the compound files in msg file" means. – Dmitry Streblechenko Sep 18 '13 at 16:36
  • If you have outlook on your computer get a message from it. After that pls install 7zip. After the instalation is ready right click on the MSG file and in the 7zip menu choose Extract to "Name_of_the_message".After this please delete your msg file. OK now you have the extracted files only. Please re-create the msg file. :) – Jordan Borisov Sep 19 '13 at 13:20
  • So 7z knows how to extract IStorage and IStream from MSG files. I had no idea it had that capability. If you wan to know whether it can put all these extracted parts back, you might want to ask the 7zip customer support. – Dmitry Streblechenko Sep 19 '13 at 14:17
  • I just want to know is there a program way :) – Jordan Borisov Sep 19 '13 at 19:09