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
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