D
Dmitry Akselrod
Hello everyone,
I am attempting to extract some header information from typical Microsoft
Outlook MSG files in VB.NET. I am not after a complete message or
attachments that may be enclosed. I am particularly interested in the
Message ID field. I have examined MSG files in notepad and hex editors. I
can see that the Internet Headers are there and present. I can do a search
for Message-ID and locate it without any problems in notepad. The only
display issue I have seen so far is that each letter is separated by hex
character 00. Thus the Message-ID string would actually be, M e s s a g e -
I D.
I don't want to use Outlook automation. I have found it to be cumbersome
and slow. I also don't want to be reliant on an installation of Office.
Since the file is binary, I have attempted to use the System.IO.StreamFile
object to read the file. However, I have
not been able successfully walk through the file and obtain any readable
text. I have played around with various encodings, such as ASCII and
Unicode. I think that MSG files are BASE64/Mime encoded though. Perhaps
that could be part of my trouble.
I have downloaded several example applications that mimic Notepad. However,
none of them have been able to read the encoding of MSG files. I have
gained a new level of appreciation for Notepad
. I wander what it is that
notepad uses to detect the file encoding and display it in such a readable
way.
Does anyone have any experience with reading Outlook data? Again, I am not
after pretty formatting, I just want to extract certain text fragments from
these binary files. Can someone point me in the right direction? I would
think that I just need to be able to read Byte Sream from the file with the
correct encoding and convert it to ASCII text. I have been totally
unsuccessful so far.
Thanks,
Dmitry
I am attempting to extract some header information from typical Microsoft
Outlook MSG files in VB.NET. I am not after a complete message or
attachments that may be enclosed. I am particularly interested in the
Message ID field. I have examined MSG files in notepad and hex editors. I
can see that the Internet Headers are there and present. I can do a search
for Message-ID and locate it without any problems in notepad. The only
display issue I have seen so far is that each letter is separated by hex
character 00. Thus the Message-ID string would actually be, M e s s a g e -
I D.
I don't want to use Outlook automation. I have found it to be cumbersome
and slow. I also don't want to be reliant on an installation of Office.
Since the file is binary, I have attempted to use the System.IO.StreamFile
object to read the file. However, I have
not been able successfully walk through the file and obtain any readable
text. I have played around with various encodings, such as ASCII and
Unicode. I think that MSG files are BASE64/Mime encoded though. Perhaps
that could be part of my trouble.
I have downloaded several example applications that mimic Notepad. However,
none of them have been able to read the encoding of MSG files. I have
gained a new level of appreciation for Notepad

notepad uses to detect the file encoding and display it in such a readable
way.
Does anyone have any experience with reading Outlook data? Again, I am not
after pretty formatting, I just want to extract certain text fragments from
these binary files. Can someone point me in the right direction? I would
think that I just need to be able to read Byte Sream from the file with the
correct encoding and convert it to ASCII text. I have been totally
unsuccessful so far.
Thanks,
Dmitry