跳到主要內容

如何在Outlook中計算每天收到的電子郵件總數?

您是否曾經計算過每天收到的電子郵件總數? 您是否厭倦了在沒有任何有效方法的情況下手動逐一計數? 在本教程中,我們為您提供了兩個技巧,用於計算Outlook中每天的電子郵件總數。


使用即時搜索功能計算今天收到的電子郵件總數

實際上,很容易地將今天收到的所有電子郵件搜索到Outlook中的“收件箱”文件夾,一個電子郵件帳戶的所有文件夾或所有電子郵件帳戶的所有文件夾,然後計算搜索結果的總數。 請執行以下操作:

郵件 視圖, (1) 選擇 收件箱 一個電子郵件帳戶的文件夾,您將在今天計算入站電子郵件; (2) 輸入搜索條件 收到:今天即時搜索 框,然後 (3) 在中指定搜索範圍 範圍 組上 檢索 標籤。 看截圖:

現在,所有搜索結果的總數,換句話說,今天收到的電子郵件總數顯示在Outlook的左下角,如下圖所示。

一鍵計算Outlook中選定電子郵件的數量

獲取Outlook文件夾中所有項目的總數或未讀項目的數量很容易。 但是如何在Outlook中的文件夾中快速獲取所選項目的數量? 這裡, Kutools for Outlook's 計算所選項目 建議使用,只需單擊一下即可快速顯示所選項目的數量!


使用搜索文件夾功能計算今天收到的電子郵件總數

此方法將指導您創建一個搜索文件夾,該文件夾將自動收集今天收到的所有電子郵件,然後通過更改搜索文件夾的屬性來獲取這些電子郵件的總數。 請執行以下操作:

1。 選擇要在導航窗格中創建搜索文件夾的電子郵件帳戶,然後單擊 > 新搜尋資料夾。 看截圖:

2。 在 新搜尋資料夾 對話框中選擇 創建一個自定義搜索文件夾 選項,然後單擊 選擇 按鈕。 看截圖:

3。 現在,出現“自定義搜索文件夾”對話框。 請在 姓名 框。

4。 繼續點擊 標準 自定義搜索文件夾中的按鈕。 現在,在“搜索文件夾條件”對話框中, (1) 點擊 您的留言 標籤, (2) 選擇 收到 來自 Time 下拉列表, (3) 指定 今天 從下面的下拉列表中,然後 (4) OK 按鈕。 看截圖:

5。 現在返回到 自定義搜索文件夾 對話框,請點擊 瀏覽 按鈕。 然後在“選擇文件夾”對話框中, (1) 請只檢查 收件箱 ,在 文件夾 列錶框,選中 搜索子文件夾 選項,然後單擊 OK 按鈕。 看截圖:

6。 然後點擊 OK 按鈕,以關閉“自定義搜索文件夾”對話框和“新建搜索文件夾”對話框。

7。 右鍵單擊您剛才創建的新搜索文件夾,然後選擇 氟化鈉性能 從右鍵單擊菜單中。 看截圖:

8。 在以下對話框中,檢查 顯示項目總數 選項,然後單擊 OK 按鈕。 看截圖:

從現在開始,每天將傳入電子郵件的副本保存到此搜索文件夾中。 如果新的一天即將到來,搜索文件夾將自動刪除所有舊郵件並開始計算新日期的電子郵件。

備註:此方法只能計算一個電子郵件帳戶的“收件箱”中今天收到的電子郵件總數。


使用VBA計算在特定日期收到的電子郵件總數

除了上述方法外,您還可以使用VBA代碼在Outlook中的特定日期對電子郵件總數進行計數。 請執行以下操作。

1。 選擇您要計算每天收到的電子郵件總數的文件夾,然後打開 Microsoft Visual Basic for Applications 按下 其他 + F11.

2。 那請 插入 > 模塊 插入新模塊,然後將下面的VBA代碼粘貼到其中。

VBA:每天計算電子郵件總數

Sub Countemailsperday()
    Dim objOutlook As Object, objnSpace As Object, objFolder As MAPIFolder
    Dim EmailCount As Integer
    Dim oDate As String
    
    oDate = InputBox("Type the date for count (format YYYY-m-d")
    Set objOutlook = CreateObject("Outlook.Application")
    Set objnSpace = objOutlook.GetNamespace("MAPI")
        On Error Resume Next
        Set objFolder = Application.ActiveExplorer.CurrentFolder
        If Err.Number <> 0 Then
        Err.Clear
        MsgBox "No such folder."
        Exit Sub
        End If
    EmailCount = objFolder.Items.Count
    MsgBox "Number of emails in the folder: " & EmailCount, , "email count"
    Dim ssitem As MailItem
    Dim dateStr As String
    Dim myItems As Outlook.Items
    Dim dict As Object
    Dim msg As String
    Set dict = CreateObject("Scripting.Dictionary")
    Set myItems = objFolder.Items
    myItems.SetColumns ("ReceivedTime")
    ' Determine date of each message:
    For Each myItem In myItems
        dateStr = GetDate(myItem.ReceivedTime)
        If dateStr = oDate Then
            If Not dict.Exists(dateStr) Then
                dict(dateStr) = 0
            End If
            dict(dateStr) = CLng(dict(dateStr)) + 1
        End If
    Next myItem
    ' Output counts per day:
    msg = ""
    For Each o In dict.Keys
        msg = msg & o & ": " & dict(o) & " items" & vbCrLf
    Next
    MsgBox msg
    Set objFolder = Nothing
    Set objnSpace = Nothing
    Set objOutlook = Nothing
End Sub
Function GetDate(dt As Date) As String
    GetDate = Year(dt) & "-" & Month(dt) & "-" & Day(dt)
End Function

3。 粘貼VBA代碼後,請點擊 按鈕。

4。 然後在彈出的對話框中輸入您要計算收到的電子郵件總數的指定日期,然後單擊 OK。 看截圖:

5。 出現一個對話框,提示您顯示所選文件夾中的電子郵件總數,請單擊 OK 按鈕。 在第二個彈出對話框中,您將獲得今天收到的電子郵件總數。 查看屏幕截圖:

筆記:
(1)此VBA只能計算所選文件夾在指定日期收到的所有電子郵件的總數;
(2)此VBA代碼在Outlook 2010、2013和2016中運行良好。


使用Kutools for Outlook計算每天收到的電子郵件總數

如果您安裝了Kutools for Outlook,則可以應用其統計功能輕鬆計算一個月中每天收到的電子郵件總數。 請執行以下操作:

Kutools for Outlook:終極 Outlook 工具包,包含 100 多個方便的工具。 免費試用 60 天,無任何限制,不用擔心!   閱讀更多...   立即開始免費試用!

1。 請點擊 Kutools 加 > 統計。 看截圖:

2。 現在出現“統計信息”對話框,請選擇要在其中計算電子郵件的指定文件夾,指定要在其中計算電子郵件的日期範圍 OK 按鈕。 看截圖:

3。 在第二個“統計”對話框中,轉到 每月的天數 選項卡或 星期幾 標籤,您可以查看每個日期收到的電子郵件總數。 看截圖:
順便說一句,您還可以獲取今天/昨天在所有電子郵件帳戶的所有收件箱文件夾中收到的電子郵件總數。 概要 標籤。


演示:用Kutools for Outlook計算每天收到的電子郵件總數


尖端: 在這個視頻裡, 庫工具 選項卡添加者 Kutools for Outlook。 如果需要,請單擊 這裡 免費試用60天!


相關文章:


最佳辦公生產力工具

Kutools for Outlook - 超過 100 種強大的功能可增強您的 Outlook

🤖 人工智慧郵件助手: 具備人工智慧魔力的即時專業電子郵件——一鍵天才回覆、完美語調、多語言掌握。輕鬆改變電子郵件! ……

📧 電子郵件自動化: 外出(適用於 POP 和 IMAP)  /  安排發送電子郵件  /  發送電子郵件時按規則自動抄送/密件副本  /  自動轉送(進階規則)   /  自動添加問候語   /  自動將多收件者電子郵件拆分為單獨的訊息 ...

📨 電子郵件管理: 輕鬆回憶電子郵件  /  按主題和其他人阻止詐騙電子郵件  /  刪除重複的電子郵件  /  進階搜索  /  合併資料夾 ...

📁 附件專業版批量保存  /  批量分離  /  批量壓縮  /  自動保存   /  自動分離  /  自動壓縮 ...

🌟 介面魔法: 😊更多又漂亮又酷的表情符號   /  使用選項卡式視圖提高 Outlook 工作效率  /  最小化 Outlook 而不是關閉 ...

👍 一鍵奇蹟: 使用傳入附件回覆全部  /   反網路釣魚電子郵件  /  🕘顯示寄件者的時區 ...

👩🏼‍🤝‍👩🏻 通訊錄和行事曆: 從選定的電子郵件中大量新增聯絡人  /  將聯絡人群組拆分為各組  /  刪除生日提醒 ...

超過 100特點 等待您的探索! 按此處了解更多。

閱讀更多       免費下載      購買
 

 

Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Is there a way to add the SenderName details too? Based on the above code, it counts emails by date. I was looking to count emails by sender and date.
This comment was minimized by the moderator on the site
can you do a date range? and add folders?
This comment was minimized by the moderator on the site
Hi Laura,
You can filter emails by the date range (https://www.extendoffice.com/documents/outlook/1412-outlook-search-date-range.html), and then get the total number of search results at the bottom of Outlook Navigation Pane.
This comment was minimized by the moderator on the site
will this (VBA) works under Outlook 365 ?
This comment was minimized by the moderator on the site
Hi Artur,
This VBA works well in Outlook 365 desktop program.
This comment was minimized by the moderator on the site
guys i have tried this code just now but it is not working can anyone help me . i want to count the num of email i received in my oracle folder .
This comment was minimized by the moderator on the site
Hi this vba script is most appreciated, Can anyone help me to retrieve the count from specific folder with specific time, Ex: Count from sent items from dd/mm/yyyy mm:hh till dd/mm/yyyy mm:hh
This comment was minimized by the moderator on the site
Did you find a resolution to this?
This comment was minimized by the moderator on the site
Hi guys, any idea how to make this work for a period o time? I mean, selecting a range date (from-to) and getting the result per day e.g inpunt range from June 1st to june 6th: 6/1 total 14 6/2 total 24 6/3 total 12 and so on... thanks in advance
This comment was minimized by the moderator on the site
in my case i was able to figure it out by doing it manually. like you can count it per month or per year.
if you will count if per month, just delete the day in the formula

e.g:
Function GetDate(dt As Date) As String
GetDate = Year(dt) & "-" & Month(dt)
End Function


per year:
Function GetDate(dt As Date) As String
GetDate = Year(dt)
End Function
This comment was minimized by the moderator on the site
For me the last window worked when I set both dates into the same format. I chnaged the code into this me (Ru date/time format in Windows, US - in Outlook): 1) oDate = Date 2) ' Determine date of each message: For Each MyItem In myItems dateStr = DateValue(MyItem.ReceivedTime) 3) GetDate = Day(dt) & "." & Month(dt) & "." & Year(dt)
This comment was minimized by the moderator on the site
Hi , Very useful code , but like above it does not count per day for me and last message box is empty , can anyone fix this please
This comment was minimized by the moderator on the site
VBA instuctions to be able to create a counter for emails recieves last week
This comment was minimized by the moderator on the site
very thanks i solved all what i need, very thanks again great effort
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations