Excel – Tracking e-mails in outlook with excel


How do I track e-mails in and out of a shared in-box in Outlook using excel? We have a large number of e-mails coming in and we need to track responses to make sure that e-mails don't get lost.

Is there as way to get the results from advanced find to an excel sheet?

Best Solution

What view are you setting up in advanced find ? As you can write a VBA macros to pull items from your inbox and put them into you speadsheet. Alot of the advance find option are not in the outlook object model so it depends on the view you are trying to set up. So can you tell me what you are doing in advanced find ..? 76mel

Ok using outlook tables you can put this in your Excel as a macro
Use "sfilter" to define your advance search criteria.
You will have to pump the data into Excel at the bottom.

Sub GetMail()

Dim oApp As Outlook.Application
Dim oFolder  As Outlook.Folder
Dim oNameSpace As Outlook.Namespace
Dim emailCount As Integer
Dim counter As Integer
Dim sfilter As String
Dim oRow As Outlook.Row
Dim oTable As Outlook.Table
Dim i As Outlook.MailItem

Set oApp = CreateObject("Outlook.Application")
Set oNameSpace = oApp.Session
Set oFolder = oNameSpace.GetDefaultFolder(olFolderInbox)

'Add what ever filter you want here using DASL
sfilter = "[LastModificationTime] > '5/1/2005'"
'Restrict with Filter
Set oTable = oFolder.GetTable(sfilter)

'Remove all columns in the default column set
'Specify desired properties

With oTable.Columns

    .Add ("EntryID")
    .Add ("Subject")
    .Add ("ReceivedTime")

End With

'Enumerate the table using test for EndOfTable
'Pump it into your worksheet
Do Until (oTable.EndOfTable)
    Set oRow = oTable.GetNextRow()
    Debug.Print (oRow("EntryID"))
    Debug.Print (oRow("Subject"))
    Debug.Print (oRow("ReceivedTime"))

'Clean up
Set oTable = Nothing
Set oFolder = Nothing
Set oNameSpace = Nothing
Set oApp = Nothing

End Sub