Folders.count Property

Gets the number of System.MessageStore.Folder items in the Folders collection.

This property is read-only.

Syntax

propVal = Folders.count()

  

Parameters

  • intFolderCount [out]
    Retrieves the number of items.

Examples

The following example demonstrates how to access properties for folders in the Folders collection.

// Member variables.
var collFolders = null;
var oFolder = null;

// --------------------------------------------------------------------
// Initialize the gadget.
// --------------------------------------------------------------------
function Init()
{
    var sMailInfo = ""; 
    
    // Get the collection of folders from Windows Mail.
    collFolders = System.MessageStore.Folders; 

    // Report the folder details.
    for (var loop = 0; loop < collFolders.count; loop++)
    {
        oFolder = collFolders.item(loop);
        sMailInfo += oFolder.name + "<br/>";
        sMailInfo += "Total messages: " + oFolder.messageCount;
        sMailInfo += " (" + oFolder.unreadMessageCount + " unread)<br/>";
    }    
    
    return sMailInfo;
}

Requirements

Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
IDL Sidebar.idl
DLL Sidebar.Exe version 1.00 or later

See Also

Reference

item

Folders

System.MessageStore

System.MessageStore.Folder

Messages

System.MessageStore.Message

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK