Outlook’s Status Bar can show how many items you have in a specific folder and also how many of those items are unread. However, a much requested feature is also have it reveal how many items have been selected.
Unlike File Explorer, Outlook doesn’t hold this option. The closest Outlook has to offer is a workaround where you press ENTER “pretending” to open all these selected items at once. In this case Outlook will warn you about how many items you are trying to open and offers you to cancel the action.
More about this workaround can be found in the MSOutlook.info Quick Tip; Count selected items
In that tip I also mention that whipping up some VBA code for it is not that hard to do. Using a VBA method to count your selected items might be preferred over the mentioned workaround as it won’t have the risk of (accidentally) actually opening all the selected items at once and cause Outlook to hang.
In this guide I’ll provide you with this code and instructions on how to implement it.
The CountSelectedItems macro allows you to find out how many items you have selected in a folder. This will work in any folder and in any View.
The result is shown in a dialog box.
Message box output of the macro.
- Download this code-file (countselected.zip) or copy the code below.
- Open the VBA Editor (keyboard shortcut ALT+F11)
- Extract the zip-file and import the
CountSelected.basfile via File-> Import…
If you copied the code, paste it into a new module.
- Sign your code so you won’t get any security prompts and the macro won’t get disabled.
- Add a button for easy access to the macro or press ALT+F8 and select the macro you want to execute.
I recommend using the Magic 8-Ball icon for this macro button.
The following code is contained in the zip-file referenced in the Quick Install. You can use the code below for review or manual installation.
Sub CountSelectedItems() Dim objSelection As Outlook.Selection Dim Result As Integer Set objSelection = Application.ActiveExplorer.Selection Result = MsgBox("Number of selected items: " & _ objSelection.Count, vbInformation, "Selected Items") End Sub