Folder.ShowItemCount Property (Outlook)
Sets or returns a constant in the OlShowItemCount enumeration that indicates whether to display the number of unread messages in the folder or the total number of items in the folder in the Navigation Pane. Read/write.
Version Information
Version Added: Outlook 2007
Syntax
expression .ShowItemCount
expression A variable that represents a Folder object.
Remarks
The ShowItemCount property does not work with Public Folders.
Example
This Microsoft Visual Basic for Applications (VBA) example displays the unread count for the Inbox in the Navigation Pane.
Sub ShowTotalItemCount()
Dim nmsName As Outlook.NameSpace
Dim fldFolder As Outlook.Folder
Set nmsName = Application.GetNamespace("MAPI")
Set fldFolder = nmsName.GetDefaultFolder(olFolderInbox)
fldFolder.ShowItemCount = olShowUnreadItemCount
End Sub