Search all past emails for specific IP

  • Thread starter Thread starter Trace
  • Start date Start date
T

Trace

Does anyone know if its possible, and if so how, to
search all my emails for the past 2-3 months for a one
that might have come from a specific IP address.

I know I can do this manually one-by-one through the
view/options but this would take an extraordinary amount
of time.
 
Hi!

You can take our free MAPIProp component and run the following code
(Tools\Macro\VB Editor; in some cases you may need to add errors
handling within cycle):

Sub Headers()
Dim expl As Explorer
Dim fld As MAPIFolder
Dim prop As Object
Dim res, k, t As String
Set expl = Application.ActiveExplorer
Set fld = expl.CurrentFolder
Set prop = CreateObject("Mapiprop.MAPIPropWrapper")
prop.Initialize

For a = 1 To fld.Items.Count
Dim msg As MailItem
Dim ar
Set msg = fld.Items(a)
xt = prop.GetOneProp(msg, &H7D001E)
k = xt
ar = Split(k, vbCrLf)
For Each s In ar
t = t & s & ";"
Next s
res = res & t & vbCrLf
Set msg = Nothing
Next a

fn = "C:\" & fld.Name & ".headers.csv"
Open fn For Output As #1
Print #1, res
Close #1

Set prop = Nothing
Set fld = Nothing
Set expl = Nothing

End Sub

You'll get text file with dump of all internet headers of messages in
current folder.

Alexander Gorlach,
MAPILab Ltd. -- Must have Outlook add-ins
http://www.mapilab.com/
 

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

Back
Top