I need to count the number of incoming emails per day per category in Outlook, and export it into Excel. I found a code which should be able to do this, however it gives an error for the Call GetAllInboxFolders line.

Private Sub 
Application_Reminder(ByVal Item As Object)
    If Item.Class = olTask And Item.Subject = "Update Email Count" Then
       Call GetAllInboxFolders
    End If
End Sub

Private Sub GetAllInboxFolders()

    Dim objInboxFolder As Outlook.Folder
    Dim strExcelFile As String
    Dim objExcelApp As Excel.Application
    Dim objExcelWorkbook As Excel.Workbook
    Dim objExcelWorksheet As Excel.Worksheet
    Dim nNextEmptyRow As Integer
    Dim lEmailCount As Long

I would like to see the dates in column A and every category in their own column (b c d etc).

0 Answers