Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Bothell, Washington, USA
    Posts
    123
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Printing Folder Sizes (2003 SP1)

    Anyone know of an easy way to print the folder sizes of any folder?

    The only way I know of is to select the folder, right-click and select Properties. Then click on the Folder Size button. This computes the sizes of all folders and sub-folders but puts it into a small window that isn't expandable, only scrollable. I can only do a CTRL/Print Screen that sends the visible portion to the clipboard, which I can then paste into Paint and print. Since I have a lot of sub-folders this is time consuming.

    I want a list or report showing all folders and sub-folders sent to my default printer.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Printing Folder Sizes (2003 SP1)

    I believe someone has posted a macro here during the past 5 years that builds a report of the number of messages in each folder for the entire file tree. But I can't recall whether it included size information. Here's an example that might help (or it might be totally confusing...):

    Count Messages Daily (2002)

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Printing Folder Sizes (2003 SP1)

    I looked at this further, and I can't find an efficient way to calculate sizes. Instead, I have to add up all the sizes of the various items in the folder, which is a slow process. At least the way I coded it, it is a slow process. You can test this proof of concept macro. It will display the size of the current folder (not including subfolders). Hopefully someone will come up with a faster solution than running this over and over on each folder!

    <code>Sub SizeOfThisFolder()
    ' Macro to calculate folder size and pop it up as a Note item
    Dim myFolder As Outlook.MAPIFolder, someItem As Object, _
    lngCount As Long, dblTotalSize As Double, _
    myNote As Outlook.NoteItem
    ' Note: might err in some situations...
    Set myFolder = ActiveExplorer.CurrentFolder
    ' Add up the sizes of each item in the folder
    For Each someItem In myFolder.Items
    lngCount = lngCount + 1
    dblTotalSize = dblTotalSize + someItem.Size
    Next
    ' Create note item with calculation results
    Set myNote = CreateItem(olNoteItem)
    With myNote
    .Body = "Size of the folder """ & myFolder.Name & """" & vbCrLf & _
    Format(lngCount, "###,##0") & " items" & vbCrLf & _
    Format(dblTotalSize / 1024, "###,###,###,##0") & " kilobytes"
    .Display
    End With
    ' Clean up object references
    Set myNote = Nothing
    Set someItem = Nothing
    Set myFolder = Nothing
    End Sub</code>
    (Note: I used a generic object variable in case the folder does not contain just a single type of item, such as mail items)

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Printing Folder Sizes (2003 SP1)

    It didn't.
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •