hsc  
 hendrickson software components
 
  Back
Outlook Message Parser
Outlook Message Parser Component (OMP)

OMP is a COM component that will parse the structured storage file (.MSG) of a Microsoft Outlook 2000, XP, 2003, 2005, 2007 email message file.

This COM DLL does NOT require Outlook, or CDO to function.  The OMP component provides properties, and methods to return the .MSG file's SMTP header, To, From, CC, Subject, the Message Body as Plain Text, the Message Body as HTML, a list of attachments, the attachment data as Binary Stream, IStream, and stream name, the date that the message was created, the date that the message was sent, and the message GUID.  Easily used in Visual Basic, REALbasic, Visual C++, and any other modern PC development environment that supports COM.  Online support available through the
message board.

Please note: the setup program for the demo was put together with the ancient VB Packaging and Deployment Wizard. It does not install on some versions of Windows. As an alternative, you can download the "no setup" version of the demo, copy the .zip contents to the folder of your choice, and from a Command Prompt run the command
regsvr32 OMPL.dll to register the component, then run the demo program. The "no setup" version of the download is here.

There is also a Java based .MSG parser available, contact sales for more information.

- Full SMTP Header
- To
- From
- CC
- Subject
- Message body as plain text
- Message body as HTML
- Attachments (List)
- Attachments Data As:
   Binary Stream
   IStream
   Stream Name
- Date Message Created
- Date Message Sent
- Message GUID
- Other message properties can be added on a fee basis.
 

 

Buy Outlook Message Parser Component

 
 

Download Demo With Setup Program

Sample usage using Visual Basic and REALbasic:

' Component Use, Visual Basic Example

Dim omp As New OutlookMsgParser.clsMsgParser
'
' you would call copy protection method here
'
txtVersion.Text = omp.Version
omp.XP2003 = chkUseXP2003.Value
omp.OpenStorage strFileName
txtHeader.Text = omp.SMTPHeader
txtSubject.Text = omp.Subject
txtTextBody.Text = omp.TextBody
txtHTMLBody.Text = omp.HTMLBody
txtToo.Text = omp.Too
txtFromm.Text = omp.Fromm
txtDatee.Text = omp.Datee
txtSubmitted.Text = omp.ClientSubmitTime
txtCreated.Text = omp.CreationTime
txtCC.Text = omp.CC
txtGUID.Text = omp.Guid
' get the attachment data
txtAttachments.Text = omp.Attachments
nNumberOfAttachmentStreams = omp.NumberOfAttachmentStreams
For i = 0 To nNumberOfAttachmentStreams - 1
   aStream = omp.AttachmentStreams(i)
   strAttachmentStreamData = strAttachmentStreamData + aStream.m_strName
   strAttachmentStreamData = strAttachmentStreamData + vbCrLf
   ' get binary stream
   strAttachmentStreamData = strAttachmentStreamData + "Binary stream ["
   strBinaryStreamData = aStream.m_cbByteArray
   For j = 1 To Len(strBinaryStreamData)
      strAttachmentStreamData = strAttachmentStreamData + "[" + Str(Asc(Mid(strBinaryStreamData, j, 1))) + "] "
      If j > 10 Then
      Exit For
      End If
   Next
   strAttachmentStreamData = strAttachmentStreamData + "] first " + Str(j) + " bytes"
   strAttachmentStreamData = strAttachmentStreamData + vbCrLf
   ' get the stream
   Set myStream.m_IStream = aStream.m_IStream
   ' allocate 2 bytes for test
   ReDim strTest(2)
   ' read 1 byte from stream
   nTest = myStream.m_IStream.Read(strTest(0), 1)
   strAttachmentStreamData = strAttachmentStreamData + "Read " + Str(nTest) + " byte from IStream, Ok!"
   strAttachmentStreamData = strAttachmentStreamData + vbCrLf
Next
txtAttachmentStreams.Text = strAttachmentStreamData
txtStatus.Text = "Processed " + omp.Subject



// Component Use, REALbasic Example
dim obj as oleobject
dim v as variant
dim strIn(1) as variant
obj = new oleObject("OutlookMsgParser.clsMsgParser", true)
// <snip, copy protection code removed, you'd call this here....>
strIn(1) = "C:\MyProjects\rbOMPSupport\testoneattachment.msg"
v = obj.invoke("OpenStorage", strIn)
v = obj.property("SMTPHeader")
editField1.text = v
v = obj.property("Subject")
ListBox1.AddRow v
v = obj.property("TextBody")
ListBox1.AddRow v
v = obj.property("HTMLBody")
ListBox1.AddRow v
v = obj.property("Attachments")
ListBox1.AddRow v
obj = Nil
exception err as oleexception
msgbox err.message



REALbasic outlook file parser outlook message parser outlook structure storage parser view viewer outlook message file outlook 2000 outlook xp outlook 2003 message parser visual basic outlook message parser

   

copyright © 1998-2010 - hendrickson software components - all rights reserved

contact webmaster