Outlook allows you to flag items for follow up, such as flagging emails, contacts and so on. In this scenario, sometimes you may want to count the flagged items. Here we will share 3 approaches with you.
Perhaps you’ve flagged a great number of items for follow up in your Outlook. For instance, you can flag a contact in that you plan to call this contact later. In face of so many flagged items, you may hope to get a count of them. Thereinafter, we will introduce you 3 means.
Method 1: Count via Search Folder
If you simply want to count the flagged emails, you can make use of search folder. Here are the detailed steps.
- To start with, in the mail navigation pane, right click on the “Search Folders”.
- Then, from its context menu, select “New Search Folder”.
- In the popup dialog box, select “Mail flagged for follow up” and click “OK”.
- Finally, you will get a total number of flagged emails in the search folder, like the following screenshot.
Method 2: Count in the To-Do List
If you’ve flagged not only emails but also contacts, contact groups and so on, you may want to get a total count of all these flagged items. In this situation, you can use the following way.
- Firstly, switch to Tasks navigation pane by “Ctrl + 4”.
- Then, access the “To-Do List”, where you will see all the flagged items, shown as the image below:
- Next, select all these items and press “Enter” key button, trying to open them in batches.
- Subsequently, you will get a warning about opening too many items, like the following picture. In the warning, there is a total count of the flagged items.
Method 3: Count with Outlook VBA
Maybe not only do you want to get a total count of all flagged items, but also you wish to get the counts of separate types of flagged items. Here is a solution in this respect.
- For a start, access Outlook VBA editor with reference to the post “How to Run VBA Code in Your Outlook“.
- Then copy the VBA code below into a module or project.
Dim lSeparateCount, lMailCount, lContactCount, lTaskCount As Long Sub CountFlaggedItems() Dim objStore As Outlook.Store Dim lTotalCount As Long Dim strMsg As String lTotalCount = 0 lMailCount = 0 lContactCount = 0 lTaskCount = 0 For Each objStore In Application.Session.Stores For Each objFolder In objStore.GetRootFolder.Folders Call ProcessFolders(objFolder, lTotalCount) Next Next strMsg = lTotalCount & " items have been flagged, as follows: " & vbCr & vbCr & "Emails: " & lMailCount & vbCr & "Contacts: " & lContactCount & vbCr & "Tasks: " & lTaskCount MsgBox strMsg, vbInformation + vbOKOnly End Sub Sub ProcessFolders(ByVal objCurrentFolder As Outlook.Folder, ByRef lCount As Long) Dim objSubfolder As Outlook.Folder Select Case objCurrentFolder.DefaultItemType Case olMailItem Call Count(objCurrentFolder, lCount) lMailCount = lMailCount + lSeparateCount Case olContactItem Call Count(objCurrentFolder, lCount) lContactCount = lContactCount + lSeparateCount Case olTaskItem Call Count(objCurrentFolder, lCount) lTaskCount = lTaskCount + lSeparateCount lCount = lCount + objCurrentFolder.Items.Count End Select If objCurrentFolder.Folders.Count > 0 Then For Each objSubfolder In objCurrentFolder.Folders Call ProcessFolders(objSubfolder, lCount) Next End If End Sub Sub Count(objCurfolder As Outlook.Folder, lCurCount As Long) Dim objItem As Object lSeparateCount = 0 For Each objItem In objCurfolder.Items Select Case objItem.Class Case olMail, olPost, olContact, olDistList, olSharing If objItem.IsMarkedAsTask = True Then lSeparateCount = lSeparateCount + 1 lCurCount = lCurCount + 1 End If Case olTask lSeparateCount = lSeparateCount + 1 End Select Next End Sub
- Finally, click into the “CountFlaggedItems” subroutine and press “F5” button.
- When the macro completes, you’ll get a message, prompting the total count of all flagged items, like the picture below.
Dispose of Annoying Outlook Troubles
In Outlook, Outlook issues can occur now and then. Thus, you had better get hold of a tip-top and trustworthy Outlook fix utility, like DataNumen Outlook Repair. It can scan your Outlook file intelligently and repair the file errors within minutes.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including mdf fix and outlook repair software products. For more information visit www.datanumen.com