편집

다음을 통해 공유


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.

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

See also

Folder Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.