Messages.count property
[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]
Gets the number of System.MessageStore.Message items in the Messages collection.
This property is read-only.
Syntax
icount = Messages.count
Property value
An Integer that receives the number of items.
Remarks
Folders exposes the Windows Mail (formerly Outlook Express) Local Folders collection. Sub-folders and their content (such as messages) are not exposed.
Examples
The following example demonstrates how to access properties for a message in the Messages collection.
var sFlyoutContent = "";
var collFolders = System.MessageStore.Folders; ;
// --------------------------------------------------------------------
// Display the flyout.
// iFolderIndex: The index of the selected folder.
// --------------------------------------------------------------------
function ShowFlyout(iFolderIndex)
{
var iBodyLength;
var oMessage = null;
var collMessages = collFolders.item(iFolderIndex).Messages;
sFlyoutContent = "<p>" + collMessages.count + " Messages:</p>";
for (var loop = 0; loop < collMessages.count; loop++)
{
oMessage = collMessages.item(loop);
// Preview a maximum of 100 characters.
iBodyLength = 100;
if (oMessage.body.length < 100)
{
iBodyLength = oMessage.body.length;
}
sFlyoutContent += oMessage.from + "<br />";
sFlyoutContent += oMessage.subject + "<br />";
sFlyoutContent += oMessage.to + "<br />";
sFlyoutContent += oMessage.body.slice(0,iBodyLength) + "<hr />";
}
System.Gadget.Flyout.show = true;
}
Requirements
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
End of client support |
Windows 7 |
End of server support |
Windows Server 2008 |
IDL |
|
DLL |
|