open from information in a attachment

G

Going_Crazy

I want to open attachments to view the header(where the message originated
from)
I know how to get to the attachment but I am unable to extract the header
information what can be done?

This is what I have so Far. Help please....!

Sub Extract_Attachment()
Dim olapp As Outlook.Application
Dim olnamespace As NameSpace
Dim olmail, msg As MailItem
Dim olatt As Attachment
Dim olTo As Recipient


Set olapp = CreateObject("Outlook.Application")
Set olnamespace = olapp.GetNamespace("MAPI")

Set myolfolder = olnamespace.GetDefaultFolder(olFolderInbox)

For Each olmail In myolfolder.Items
If olmail.SenderName = "(e-mail address removed)" Then
For Each olTo In olmail.Recipients

If olTo.Name = "undisclosed_recipients@Where_ever.com" Then
For Each olatt In olmail.Attachments

'' code to extract header the part i can't get




Next
End If

Next
End If
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top