मुख्य सामग्री पर जाएं

आउटलुक में श्रेणी के अनुसार ईमेल की गिनती कैसे करें?

लेखक: केली अंतिम संशोधित: 2016-11-15

आपने आउटलुक में रंग श्रेणियों के साथ ईमेल को हाइलाइट किया होगा। लेकिन, क्या आप जानते हैं कि श्रेणियों के आधार पर ईमेल की गिनती कैसे की जाती है? यह आलेख दो समाधान साझा करेगा:

ऑफिस टैब - माइक्रोसॉफ्ट ऑफिस में टैब्ड एडिटिंग और ब्राउजिंग सक्षम करें, जिससे काम आसान हो जाएगा
आउटलुक के लिए कुटूल - बेहतर दक्षता के लिए 100+ उन्नत सुविधाओं के साथ आउटलुक को बढ़ावा दें
इन उन्नत सुविधाओं के साथ अपने आउटलुक 2021 - 2010 या आउटलुक 365 को बूस्ट करें। व्यापक 60-दिवसीय निःशुल्क परीक्षण का आनंद लें और अपने ईमेल अनुभव को उन्नत करें!

तीर नीला दायां बुलबुला त्वरित खोज सुविधा के साथ आउटलुक में श्रेणी के अनुसार ईमेल की गणना करें

यह विधि आपको निर्दिष्ट रंग श्रेणियों के साथ चिह्नित सभी ईमेल का पता लगाने में मार्गदर्शन करेगी त्वरित खोज सुविधा, और फिर आसानी से सभी खोज परिणामों की कुल संख्या प्राप्त करें स्थिति पट्टी.

1। में मेल देखें, दबाएँ कंट्रोल + E सक्रिय करने के लिए एक साथ कुंजियाँ खोज के औज़ार.

2। क्लिक करें Search > वर्गीकृत किया, और फिर निर्दिष्ट रंग श्रेणी का चयन करें जिसके द्वारा आप ईमेल की गिनती करेंगे।

3. अब निर्दिष्ट रंग श्रेणी से चिह्नित सभी ईमेल ढूंढे गए हैं और मेल सूची में सूचीबद्ध हैं। और आप स्टेटस बार पर सभी खोज परिणामों की कुल संख्या आसानी से प्राप्त कर सकते हैं। स्क्रीनशॉट देखें:

टिप्पणियाँ:

(1) चिह्नित ईमेल की गिनती के लिए पीली श्रेणी और नारंगी श्रेणी साथ ही, कृपया खोज मानदंड टाइप करें श्रेणी:='पीली श्रेणी' और 'नारंगी श्रेणी' में त्वरित खोज सीधे बॉक्स:

(2) चिह्नित ईमेल की गिनती के लिए पीली श्रेणी or नारंगी श्रेणी साथ ही, कृपया खोज मानदंड टाइप करें श्रेणी:='पीली श्रेणी' या 'नारंगी श्रेणी' में त्वरित खोज सीधे बॉक्स.


तीर नीला दायां बुलबुला वीबीए के साथ आउटलुक में श्रेणी के अनुसार ईमेल की गणना करें

यह विधि आउटलुक में एक कस्टम तिथि सीमा में श्रेणी के अनुसार ईमेल की गणना करने के लिए एक वीबीए पेश करेगी। कृपया इस प्रकार करें:

1। में मेल देखें, उस ईमेल फ़ोल्डर का चयन करें जिसमें आप ईमेल की गिनती करेंगे।

2। दबाएँ ऑल्ट + F11 एप्लिकेशन विंडो के लिए Microsoft Visual Basic खोलने के लिए कुंजियाँ एक साथ।

3। क्लिक करें सम्मिलित करें > मॉड्यूल, और फिर नई खुलने वाली मॉड्यूल विंडो में नीचे VBA कोड पेस्ट करें:

वीबीए: आउटलुक में श्रेणी के अनुसार ईमेल की गणना करें

Sub CategoriesEmails()

Dim oFolder As MAPIFolder
Dim oDict As Object
Dim sStartDate As String
Dim sEndDate As String
Dim oItems As Outlook.Items
Dim sStr As String
Dim sMsg As String


On Error Resume Next
Set oFolder = Application.ActiveExplorer.CurrentFolder

Set oDict = CreateObject("Scripting.Dictionary")

sStartDate = InputBox("Type the start date (format MM/DD/YYYY)")
sEndDate = InputBox("Type the end date (format MM/DD/YYYY)")

Set oItems = oFolder.Items.Restrict("[Received] >= '" & sStartDate & "' And [Received] <= '" & sEndDate & "'")
oItems.SetColumns ("Categories")

For Each aitem In oItems
sStr = aitem.Categories
If Not oDict.Exists(sStr) Then
oDict(sStr) = 0
End If
oDict(sStr) = CLng(oDict(sStr)) + 1
Next aitem

sMsg = ""
For Each aKey In oDict.Keys
sMsg = sMsg & aKey & ":   " & oDict(aKey) & vbCrLf
Next
MsgBox sMsg

Set oFolder = Nothing

 End Sub

4। दबाएं F5 इस VBA को चलाने के लिए कुंजी या रन बटन पर क्लिक करें।

5. (1) सबसे पहले खुलने वाले माइक्रोसॉफ्ट आउटलुक डायलॉग बॉक्स में, कृपया उस कस्टम तिथि सीमा की आरंभ तिथि टाइप करें जिसके भीतर आप ईमेल की गिनती करेंगे, और क्लिक करें OK बटन. (2) दूसरे माइक्रोसॉफ्ट आउटलुक संवाद बॉक्स में, कृपया अंतिम तिथि टाइप करें, और क्लिक करें OK बटन। स्क्रीनशॉट देखें:

और अब एक डायलॉग बॉक्स सामने आता है और रंग श्रेणियों से चिह्नित ईमेल की संख्या प्रदर्शित करता है। स्क्रीनशॉट देखें:


तीर नीला दायां बुलबुलासंबंधित आलेख


सर्वोत्तम कार्यालय उत्पादकता उपकरण

आउटलुक के लिए कुटूल - आपके आउटलुक को सुपरचार्ज करने के लिए 100 से अधिक शक्तिशाली सुविधाएँ

🤖 एआई मेल सहायक: एआई जादू के साथ त्वरित प्रो ईमेल - प्रतिभाशाली उत्तरों के लिए एक-क्लिक, सही टोन, बहुभाषी महारत। ईमेलिंग को सहजता से रूपांतरित करें! ...

📧 ईमेल स्वचालन: कार्यालय से बाहर (POP और IMAP के लिए उपलब्ध)  /  ईमेल भेजने का शेड्यूल करें  /  ईमेल भेजते समय नियमों के अनुसार ऑटो सीसी/बीसीसी  /  स्वतः अग्रेषित (उन्नत नियम)   /  स्वतः ग्रीटिंग जोड़ें   /  बहु-प्राप्तकर्ता ईमेल को स्वचालित रूप से अलग-अलग संदेशों में विभाजित करें ...

📨 ईमेल प्रबंधन: आसानी से ईमेल याद रखें  /  विषयों और अन्य लोगों द्वारा घोटाले वाले ईमेल को ब्लॉक करें  /  डुप्लिकेट ईमेल हटाएँ  /  उन्नत खोज  /  फ़ोल्डरों को समेकित करें ...

📁 अनुलग्नक प्रोबैच सहेजें  /  बैच अलग करना  /  बैच संपीड़न  /  ऑटो सहेजें   /  ऑटो डिटैच  /  ऑटो कंप्रेस ...

🌟 इंटरफ़ेस जादू: 😊अधिक सुंदर और शानदार इमोजी   /  टैब्ड व्यू के साथ अपनी आउटलुक उत्पादकता बढ़ाएँ  /  आउटलुक को बंद करने के बजाय छोटा करें ...

???? एक-क्लिक चमत्कार: आने वाले अनुलग्नकों के साथ सभी को उत्तर दें  /   फ़िशिंग-रोधी ईमेल  /  🕘प्रेषक का समय क्षेत्र दिखाएं ...

👩🏼‍🤝‍👩🏻 संपर्क एवं कैलेंडर: बैच चयनित ईमेल से संपर्क जोड़ें  /  किसी संपर्क समूह को अलग-अलग समूहों में विभाजित करें  /  जन्मदिन अनुस्मारक हटाएँ ...

के ऊपर 100 सुविधाएँ आपके अन्वेषण की प्रतीक्षा करें! अधिक जानने के लिए यहां क्लिक करें।

 

 

Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
hi, i was able to do the export to excel, by eliminating the row Dim xWb As Workbook, xWs As Worksheet, but i really need to count the emails on daily basis, on the input date window, if i put the same day it wont give me back any results, i have to put 2 different days for it to work, is there a way around this? so i can count the emails on 1 day instead of 2
This comment was minimized by the moderator on the site
The total number of emails just used to appear beside the Name of the catagory. Does anyone know how to set this?
This comment was minimized by the moderator on the site
Hi,
Instead of only calculating from the selected folder, is there a way to include all the sub folders as well?
This comment was minimized by the moderator on the site
Hi
Did you manage to solve this ?
I would like to count in subfolders to.
This comment was minimized by the moderator on the site
Hello, is there is a possibility to count letters marked with categories if in one letter we have few cases and they must be counted: for example green category - 1 letter with 3 cases inside = 3 green category cases ?


ThANK YOU
This comment was minimized by the moderator on the site
is there a way you can covert this into an excel table?
This comment was minimized by the moderator on the site
Hi Dylan,
Below VBA code will place the count results in a new Excel workbook.
FYI, please enable the reference of “Microsoft Excel 16.0 Object Library” before running the VBA.
Sub CategoriesEmails()
Dim xFolder As MAPIFolder
Dim xDict As Object
Dim xStartDate As String, xEndDate As String
Dim xItems As Outlook.Items
Dim xStr As String, xMsg As String
Dim xExlApp As Object
Dim xWb As Workbook, xWs As Worksheet
Dim I As Integer
On Error Resume Next
Set xExlApp = CreateObject("Excel.Application")
Set xWb = xExlApp.Workbooks.Add
Set xWs = xWb.Sheets.Item(1)
Set xFolder = Application.ActiveExplorer.CurrentFolder
Set xDict = CreateObject("Scripting.Dictionary")
xStartDate = InputBox("Type the start date (format MM/DD/YYYY)")
xEndDate = InputBox("Type the end date (format MM/DD/YYYY)")
Set xItems = xFolder.Items.Restrict("[ReceivedTime] >= '" & xStartDate & "' And [ReceivedTime] <= '" & xEndDate & "'")
'xItems.SetColumns ("Categories")
For Each xItem In xItems
xStr = xItem.Categories
If Not xDict.Exists(xStr) Then
xDict(xStr) = 0
End If
xDict(xStr) = CLng(xDict(xStr)) + 1
Next xItem
xMsg = ""
xWs.Range("A1", "B1").Font.Bold = True
With xWs.Range("A1", "B1")
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
xWs.Cells(1, 1) = "Categories"
xWs.Cells(1, 2) = "Count"
I = 2
For Each xKey In xDict.Keys
If xKey <> "" Then
xWs.Cells(I, 1) = xKey
xWs.Cells(I, 2) = xDict(xKey)
I = I + 1
End If
Next
xWs.Range("A1", "B" + CStr(I)).Columns.AutoFit
xExlApp.Visible = True
Set xFolder = Nothing
End Sub
This comment was minimized by the moderator on the site
Hi guys,
To make the above code run porperly, please first enable the reference of “Microsoft Excel 16.0 Object Library”.
To do so, please do as follows:1. In your Outlook, go to the tab Developer > Visual Basic.2. In the pop-up window, click Tools.3. In the pop-up dialog, check Microsoft Excel 16.0 Object Library, then click OK, see screenshot.
Note that the 16.0 indicates version number, so if it's not the same in your dialog, it doesn't matther. However, if you cannot find the Microsoft Excel (version number) Object Library, make sure that you have Excel installed in your computer.
After you enable the reference, please use the code above.
If you have any further questions, please don't hesitate to let me know.
Amanda
This comment was minimized by the moderator on the site
I know this is an older thread, but if anyone can assist it would be greatly appreciated. When running the code I'm hitting a compile error "User-defined type not defined" for the 8th line "Dim xWB As Workbook, xWs As Worksheet"
This comment was minimized by the moderator on the site
Hi
Did you manage to solve this ?
I got the same problem
Solution:
Simply delete the row:Dim xWb As Workbook, xWs As Worksheet
This comment was minimized by the moderator on the site
Can you add a way to breakout the count columns by day? So I could run a full month and then have counts broken out by day.
This comment was minimized by the moderator on the site
Hi Hannah,

Please try the code below:

<div data-tag="code">Sub CategoriesEmails()
Dim oFolder As MAPIFolder
Dim oDict As Object
Dim sStartDate As String
Dim sEndDate As String
Dim oItems As Outlook.Items
Dim sStr As String
Dim sMsg As String
Dim xStr, xStrDate, xStrDate_D As String
Dim xArr As Variant
Dim xNum As Integer
Dim xRlt As String
On Error Resume Next
Set oFolder = Application.ActiveExplorer.CurrentFolder
xNum = 0
Set oDict = CreateObject("Scripting.Dictionary")
sStartDate = InputBox("Type the start date (format MM/DD/YYYY)")
sEndDate = InputBox("Type the end date (format MM/DD/YYYY)")
Set oItems = oFolder.Items.Restrict("[ReceivedTime] >= '" & sStartDate & "' And [ReceivedTime] <= '" & sEndDate & "'")
oItems.SetColumns ("ReceivedTime")
xStrDate_D = ""
xRlt = ""
For Each aitem In oItems
xStr = aitem.ReceivedTime
If Trim(xStr) <> "" Then
xArr = Split(xStr, " ")
xStrDate = xArr(0)
If xStrDate_D = "" Then
xStrDate_D = xStrDate
xNum = 1
Else
If xStrDate <> "" Then
If xStrDate = xStrDate_D Then
xNum = xNum + 1
Else
If xRlt = "" Then
xRlt = xStrDate_D & ":" & xNum
Else
xRlt = xRlt & vbCrLf & xStrDate_D & ":" & xNum
End If
xStrDate_D = xStrDate
xNum = 1
End If
End If
End If
End If
Next
If xRlt <> "" Then
MsgBox xRlt
Else
MsgBox "No data found."
End If
End Sub
Also, for more statistic analysis, please go to the tab Kutools Plus > Statistics if you have installed Kutools for Outlook. If not, please <a href="https://www.extendoffice.com/download/kutools-for-outlook.html">click here to download</a> and get a 30-day trail for free.
Amanda
This comment was minimized by the moderator on the site
Thank you so much for your help!! I don't think I was clear enough in my initial question. Is there a way to have it break out by category and then give a count by day? So X Category would be broken down by count into date columns?
This comment was minimized by the moderator on the site
This was helpful for me also, thank you so much for sharing!
This comment was minimized by the moderator on the site
Hi , thanks it workd perfectly for month of June, but when I run this for July, it only shows the total number of emails... any idea?
This comment was minimized by the moderator on the site
Hi Thanks, it works perfectly, just one quick query- Can we get the Msgbox results to be displayed in excel, as whenever i want to run the macro it should be displayed in excel.
every time one below the previous results.
This comment was minimized by the moderator on the site
This would be great!
This comment was minimized by the moderator on the site
This is perfect, but how can I change the VBA to include subfolders of the current folder in the count?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations