1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Show total # of items in a folder in Outlook

Discussion in 'Microsoft Mail (Outlook / OE / Windows Mail)' started by w.young, 2006/10/09.

  1. 2006/10/09
    w.young

    w.young Inactive Thread Starter

    Joined:
    2002/01/07
    Messages:
    291
    Likes Received:
    0
    I have 40+ folders in Outlook 2003 where I store emails. This helps me to sort them.
    I found a way to 'show the total # of items in the folder'. IE: 10 emails in the folder.

    BUT can't figure a way to have all the folders display the total #. Only way is to select each folder and select 'show the total # of items in the folder' under properties of that folder.

    IS there a way to change all folders at one time rather than doing each individually?

    Thanks
    Bill
     
  2. 2006/10/09
    David Ryan

    David Ryan Inactive

    Joined:
    2006/07/26
    Messages:
    101
    Likes Received:
    0
    Try the Macro at the end of this post. It cycles through all subfolders of the selected folder, displays their name and changes their show type to All items or Unread items (depending on a popup at the beginning of the macro). Binding it to a button will cut even more time out of the process.
    Code:
    Public Sub ToggleShowItems()
    
        Dim myolApp As Outlook.Application
        Dim myNamespace As Outlook.NameSpace
        Dim currentSubFolders As Folders
        Dim tempInteger As Integer
        Dim showType As Integer
        Dim thisSubFolder
    
        Set myolApp = CreateObject( "Outlook.Application ")
        Set myNamespace = myolApp.GetNamespace( "MAPI ")
        Set currentSubFolders = myolApp.ActiveExplorer.currentFolder.Folders
        Set thisSubFolder = currentSubFolders.GetFirst
        
        tempInteger = MsgBox( "Click YES to Show all Items, NO for only Unread Items and CANCEL to abort ", vbYesNoCancel,  "Change Show property for subfolders of" + myolApp.ActiveExplorer.currentFolder)
        If tempInteger = 6 Then
            showType = olShowTotalItemCount
        ElseIf tempInteger = 7 Then
            showType = olShowUnreadItemCount
        Else
            GoTo Finish
        End If
        
        Do While Not thisSubFolder Is Nothing
            MsgBox (thisSubFolder)
            thisSubFolder.ShowItemCount = showType
            Set thisSubFolder = currentSubFolders.GetNext
            
        Loop
    
    Finish:
    End Sub
    
    
     

  3. to hide this advert.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.