跳到主要内容

如何在Outlook中计算每天收到的电子邮件总数?

您是否曾经计算过每天收到的电子邮件总数? 您是否厌倦了没有任何有效方法手动逐一计数它们? 在本教程中,我们为您提供了两个技巧,用于计算Outlook中每天的电子邮件总数。


使用即时搜索功能计算今天收到的电子邮件总数

实际上,很容易地将今天收到的所有电子邮件搜索到Outlook中的“收件箱”文件夹,一个电子邮件帐户的所有文件夹或所有电子邮件帐户的所有文件夹,然后计算搜索结果的总数。 请执行以下操作:

邮箱: 查看, (1) 选择 收件箱 一个电子邮件帐户的文件夹,您将在今天计算收到的电子邮件; (2) 输入搜索条件 收到:今天即时搜索 框,然后 (3) 在中指定搜索范围 范围 组上 搜索 标签。 看截图:

现在,所有搜索结果的总数,换句话说,今天收到的电子邮件总数显示在Outlook的左下角,如下图所示。

一键计算Outlook中选定电子邮件的数量

很容易获得Outlook文件夹中所有项目的总数或未读项目的数量。 但是如何在Outlook中的文件夹中快速获取所选项目的数量? 这里, Kutools for Outlook's 计算所选项目 建议使用,只需单击一下即可快速显示所选项目的数量!


使用搜索文件夹功能计算今天收到的电子邮件总数

此方法将指导您创建一个搜索文件夹,该文件夹将自动收集今天收到的所有电子邮件,然后通过更改搜索文件夹的属性可以获取这些电子邮件的总数。 请执行以下操作:

1。 选择要在导航窗格中创建搜索文件夹的电子邮件帐户,然后单击 > 新搜寻资料夹。 看截图:

2。 在 新搜寻资料夹 对话框中,选择 创建一个自定义搜索文件夹 选项,然后单击 按钮。 看截图:

3。 现在,出现“自定义搜索文件夹”对话框。 请在 名字 框。

4。 继续点击 标准 自定义搜索文件夹中的按钮。 现在,在“搜索文件夹条件”对话框中, (1) 点击 想说的话 标签, (2) 选择 收到 来自 时间 下拉列表, (3) 指定 的旅程 从下面的下拉列表中,然后 (4) 点击 OK 按钮。 看截图:

5。 现在返回到 自定义搜索文件夹 对话框,请点击 浏览 按钮。 然后在“选择文件夹”对话框中, (1) 请只检查 收件箱 ,在 文件夹 列表框,选中 搜索子文件夹 选项,然后单击 OK 按钮。 看截图:

6。 然后点击 OK 按钮,以关闭“自定义搜索文件夹”对话框和“新建搜索文件夹”对话框。

7。 右键单击您刚才创建的新搜索文件夹,然后选择 查看房源 从右键单击菜单中。 看截图:

8。 在以下对话框中,检查 显示项目总数 选项,然后单击 OK 按钮。 看截图:

从现在开始,每天将传入电子邮件的副本保存到此搜索文件夹中。 如果新的一天即将到来,搜索文件夹将自动删除所有旧邮件并开始计算新日期的电子邮件。

备注:此方法只能计算一个电子邮件帐户的“收件箱”中今天收到的电子邮件总数。


使用VBA计算在特定日期收到的电子邮件总数

除了上述方法外,您还可以使用VBA代码在Outlook中的特定日期对电子邮件总数进行计数。 请执行以下操作。

1。 选择您要计算每天收到的电子邮件总数的文件夹,然后打开 Microsoft Visual Basic应用程序 按下 其他 + 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 计算每天收到的电子邮件总数

如果您安装了 Outlook 的 Kutools,您可以应用其统计功能来轻松计算一个月内每天收到的电子邮件总数。请按以下步骤操作:

Kutools for Outlook:终极 Outlook 工具包,包含 100 多个方便的工具。 免费试用 60 天,无任何限制,不用担心!   阅读更多    立即开始免费试用!

1。 请点击 Kutools 加 > 统计报表。 看截图:

2。 现在出现“统计信息”对话框,请选择要在其中计算电子邮件的指定文件夹,指定要在其中计算电子邮件的日期范围点击 OK 按钮。 看截图:

3。 在第二个“统计”对话框中,转到 每月的天数 标签或 星期几 标签,您可以查看每个日期收到的电子邮件总数。 看截图:
顺便说一句,您还可以获取今天/昨天在所有电子邮件帐户的所有收件箱文件夹中收到的电子邮件总数。 总结 标签。


演示:使用 Kutools for Outlook 计算每天收到的电子邮件总数


Tips:: 在这个视频里, 库工具 选项卡添加者 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