跳到主要内容

如何计算Outlook中所有文件夹中的项目(电子邮件)总数?

在Outlook中,它会自动在“导航”窗格中的文件夹名称旁边显示未读项目/电子邮件的数量,如右图所示。 但是现在,您需要计算项目/电子邮件的总数,而不是未读项目/电子邮件的总数,怎么办? 以下变通办法将轻松解决此问题!


计算一个文件夹中的项目/电子邮件总数

要计算Outlook中一个文件夹中的项目/电子邮件总数,您可以轻松地更改此文件夹的属性以进行存档。

1。 在导航窗格中,右键单击要计算其项目总数的文件夹,然后选择 查看房源 从右键单击菜单中。 参见下面的截图:

2。 在打开的“属性”对话框中,请检查 显示项目总数 选项,然后单击 OK 按钮。 参见上面的截图:

现在,文件夹名称旁边的未读项目数将替换为所有项目/电子邮件的总数。 看截图:

笔记:
(1)在导航窗格中选择文件夹后,所有电子邮件的数量和未读电子邮件的数量也会显示在 状态栏.
(2)此方法一次只能显示一个文件夹的项目/电子邮件总数。 要显示所有文件夹的项目总数,请尝试以下VBA。

使用VBA计算所有文件夹中的项目/电子邮件总数

要计算所有文件夹中所有项目的总数,请在Outlook中的VBA代码下方应用。

1。 按 其他 + F11 同时按下两个键可以打开“ Microsoft Visual Basic for Applications”窗口。

2。 点击 插页 > 模块,然后将以下VBA代码粘贴到新打开的“模块”窗口中。

VBA:计算/显示Outlook中所有文件夹中的项目/电子邮件总数

Sub ShowTotalInAllFolders()
Dim oStore As Outlook.Store
Dim oRoot As Outlook.Folder

On Error Resume Next

For Each oStore In Application.Session.Stores
Set oRoot = oStore.GetRootFolder
ShowTotalInFolders oRoot
Next
End Sub

Private Sub ShowTotalInFolders(ByVal Root As Outlook.Folder)
Dim oFolder As Outlook.Folder

On Error Resume Next

If Root.Folders.Count > 0 Then
For Each oFolder In Root.Folders
oFolder.ShowItemCount = olShowTotalItemCount
ShowTotalInFolders oFolder
Next
End If
End Sub

3。 按 F5 键或单击 运行 按钮以运行此VBA。
现在,每个文件夹中的项目/电子邮件总数显示在文件夹名称旁边。 看截图:


使用 Kutools for Outlook 计算每个文件夹中的项目/电子邮件总数

如果您安装了 Outlook 的 Kutools,您可以快速计算每个文件夹中所有项目/电子邮件的总数及其 所有文件夹显示项目总数 特征。 请执行以下操作:

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

点击 Kutools 加 > 显示项目数 > 所有文件夹显示项目总数.
所有文件夹中的文档计数项目电子邮件001

现在,导航窗格上每个文件夹后面的未读项目数立即更改为所有项目的总数。 看截图:所有文件夹中的文档计数项目电子邮件4

Kutools for Outlook:通过 100 多种必备工具增强 Outlook 功能。 60 天免费试驾,无任何附加条件!   阅读更多    立即下载!


计算所有/多个文件夹中所有项目/电子邮件的总数

上述所有方法都在讨论计算每个文件夹中所有电子邮件的总数。您是否想过将每个文件夹中的项目数量相加并返回总数?此方法将引入 Kutools for Outlook 的 统计报表 此功能可计算所有文件夹中所有/多个项目的总数。

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

1。 点击 Kutools 加 > 统计报表。 看截图:
所有文件夹中的文档计数项目电子邮件002

2。 点击 OK 直接在第一个“统计”对话框中单击按钮。
备注:默认情况下,所有电子邮件帐户中的所有文件夹均处于选中状态。 要计算多个文件夹中的总数,请仅检查它们,然后单击 OK 按钮。

现在,出现第二个“统计”对话框,您将获得在Outlook中配置的所有电子邮件帐户的所有文件夹中的所有项目/电子邮件的总数。 看截图:

Kutools for Outlook:通过 100 多种必备工具增强 Outlook 功能。 60 天免费试驾,无任何附加条件!   阅读更多    立即下载!


演示:计算Outlook中每个/多个/所有文件夹中的项目(电子邮件)总数


Tips:: 在这个视频里, 库工具 选项卡添加者 Kutools for Outlook。 如果需要,请单击 了解更多 免费试用60天!


相关文章


最佳办公生产力工具

Kutools for Outlook - 超过 100 种强大功能可增强您的 Outlook

🤖 人工智能邮件助手: 具有人工智能魔力的即时专业电子邮件——一键天才回复、完美语气、多语言掌握。轻松改变电子邮件! ...

📧 电子邮件自动化: 外出(适用于 POP 和 IMAP)  /  安排发送电子邮件  /  发送电子邮件时按规则自动抄送/密件抄送  /  自动转发(高级规则)   /  自动添加问候语   /  自动将多收件人电子邮件拆分为单独的消息 ...

📨 电子邮件管理: 轻松回忆电子邮件  /  按主题和其他人阻止诈骗电子邮件  /  删除重复的电子邮件  /  高级搜索  /  合并文件夹 ...

📁 附件专业版批量保存  /  批量分离  /  批量压缩  /  自动保存   /  自动分离  /  自动压缩 ...

🌟 界面魔法: 😊更多又漂亮又酷的表情符号   /  使用选项卡式视图提高 Outlook 工作效率  /  最小化 Outlook 而不是关闭 ...

👍 一键奇迹: 使用传入附件回复全部  /   反网络钓鱼电子邮件  /  🕘显示发件人的时区 ...

👩🏼‍🤝‍👩🏻 通讯录和日历: 从选定的电子邮件中批量添加联系人  /  将联系人组拆分为各个组  /  删除生日提醒 ...

超过 100特点 等待您的探索! 单击此处了解更多。

了解更多       免费下载      购买
 

 

Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hoping you guys can help me out. I used the VBA method above but now would like to remove it. I deleted the module in outlook and in C:\Users\user\AppData\Roaming\Microsoft\Outlook but the totals are still appearing next to the folder names.
This comment was minimized by the moderator on the site
Hi Michael,
Start Outlook, right click the folder you want to turn off the total number of items on the Navigation Pane, select Properties in the context menu, and then check Show number of unread items on the General tab in the Properties dialog. See screenshot:
Note that you can turn off the total number of items for one folder at a time. If you want to turn off total numbers of items for all folders in your Outlook, Kutools for Outlook’s All Folders Show Number of Unread Items feature is recommended. https://www.extendoffice.com/documents/outlook/3728-outlook-count-items-emails-in-all-folders.html#kto
This comment was minimized by the moderator on the site
I searched quite a bit before discovering this. The VBA worked quite well and did exactly what I wanted.

Unforseen issue, the effect seems permanent. Took a while to figure how to resolve/undo. Change this one line from...

oFolder.ShowItemCount = olShowTotalItemCount to...

oFolder.ShowItemCount = olShowUnreadItemCount

...and there's another constant that can be used, olShowNoItemCount, if no counts should be displayed.

The first two are available through the UI but, so far as I could tell, have to be applied on a folder by folder basis so the VBA is a real time saver!
This comment was minimized by the moderator on the site
Hi Alan,
Thank you very much for your comment and suggestion on the VBA. Actually, Kutools for Outlook has released the Show Number of Items feature to quickly show or hide the total number of items or the number of unread items in each folder by one click.
This comment was minimized by the moderator on the site
I Googled this question several ways, all included Outlook or Office 365, but of the 100's of links, NONE showed how to do this in Outlook online. All show how in Outlook desktop.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations