ISMessagesList.Count

Description

The number of the messages in the list.

Syntax

object.Count

Part Attribute Type Description
object Required
The object always implements the ISMessagesList interface
Restriction: This property is readonly.

Return Value

int

Example

Display the total amount of the messages and the information about them.

Dim aProvider
Dim aFilter
Dim aMessages
Dim aMessage
Dim aPageNumber
Dim aInfo
Dim i

Set aProvider = Profile.LoadProvider("ADMIN")
set aFilter = Profile.CreateLoadMessagesParams(aProvider.Id)

aFilter.StartIndex = 0
aFilter.CountOnPage = 10

aPageNumber = 1
do
  set aMessages = Profile.LoadMessages(aFilter)  
  if aPageNumber = 1 then
    aInfo = aInfo & "Total Count: " & aMessages.GetCountAll  
  end if 
  
  aInfo = aInfo & vbNewLine & vbNewLine & "------- Page " & aPageNumber & " ----------" & vbNewLine
  aPageNumber = aPageNumber + 1
  
  for i = 0 to aMessages.Count - 1  
    set aMessage = aMessages.Item(i)
    aInfo = aInfo & vbNewLine & (i + 1) & ") The message was sent by " & aMessage.Sender & " on " & aMessage.Sent      
  next
  aFilter.StartIndex = aFilter.StartIndex + aFilter.CountOnPage
loop while aFilter.CountOnPage = aMessages.Count

Profile.MsgBox(aInfo)
Note:

In Profile Client v8 on User Interface Messages can be found in Organisation > Work Centre > Communication > Email.

Version information

Added in v7.8.0