I'm trying to read a message header in Outlook format (RFC2822). also I supposed to download the entire message in a MemoryStream format, but I couldn't do that only using the interop.outlookthis is part of the code' Create Outlook application.Dim oApp As Outlook.Application = New Outlook.Application' Get Mapi NameSpace.Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")oNS.Logon("julioz", "zapata", False, True) ' TODO:' Get Messages collection of Inbox.Dim oInbox As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)Dim oItems As Outlook.Items = oInbox.ItemsConsole.WriteLine("Total : " & oItems.Count)Dim sSearch As String' Get unread e-mail messages.sSearch = "[Unread] = True"oItems = oItems.Restrict("[Unread] = True")'Console.WriteLine("Total Unread : " & oItems.Count)' Loop each unread message.Dim oMsg As Outlook.ReportItem'Memory stream declarations Dim objItem As IntegerDim s As Char()Dim str As StringDim i As IntegerDim ms As New MemoryStream'__________________________
str = oMsg.Subject & oMsg.EntryID & oMsg.Bodys = str.ToCharArray
ms.Write(b, 0, s.Length)
bs.Process(ms)
oApp =