Sometimes you may want to count the total number of selected items in Outlook. It is too time-consuming to count them one by one. This article will introduce 2 quick means.
As usual, you can easily get the total number of the items in the current folder by referring to the number on the status bar. But if you would like to quickly get the number of currently selected items, the status bar will be helpless. You should utilize other approaches. Here we will exhibit 2 fast techniques. Both of them are pretty easy and convenient. You can choose either as per your preference.
Method 1: Count the Selected Items via VBA Codes
- At first, launch Outlook and head to “Developer” tab.
- Then locate and click on the “Visual Basic” button in the “Code” group.
- After that, a new “Microsoft Visual Basic for Applications” window will open up.
- Later you should open a new Module.
- In the new module, you ought to copy and paste the following VBA codes.
Sub CountSelectedItems() Dim olApp As Application Dim SelItems As Outlook.Selection Dim IntRes As Integer Dim StrMsg As String Set olApp = Outlook.Application Set SelItems = olApp.ActiveExplorer.Selection StrMsg = "You've Selected " & SelItems.Count & " Items!" IntRes = MsgBox(StrMsg, vbOKOnly + vbInformation, "Count Selected Outlook Items") End Sub
- Subsequently, click the “Save” icon in the toolbar and exit the current window.
- After that, you can click the down arrow in the Quick Access Toolbar and choose “More Commands” from the drop down list.
- In the new popup “Outlook Options” window, take the following steps:
- Firstly, select “Macros” in the “Choose commands from” field.
- Then from the macro list, choose the previously added macro and click “Add” button.
- Lastly click “OK” button.
- Now you can have a try. Select several Outlook items, and then click on the macro button on the Quick Access Toolbar. You will receive a dialog box, like the following picture:
Method 2: Count the Selected Items via “Enter” Key Button
Unlike the above method which creates a new message box via VBA for counting, the Method 2 is to make use of an internal Outlook feature. It is a hotkey – “Enter” key button, which originally serves as an Outlook alert.
- Firstly, select Outlook Items which you want to count.
- Then press the “Enter” key button. Immediately, you will get an Outlook alert, shown as the image below:
Comparison of the 2 Methods
Methods | Advantages | Disadvantages |
Count via VBA | It can count items with no limits. | You should change the macro settings in “Trust Center”. |
Count via “Enter” | It is very simple. | It cannot work if you select less than 4 items. |
Resolve Outlook Problems
Outlook issues can happen from time to time. Therefore, as regular users, we can keep calm when coming across them and take immediate actions to address them. If the issues are involved with the PST mail corruption, you can resort to Outlook inbox repair tool, ScanPST.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair SQL file error and outlook repair software products. For more information visit www.datanumen.com