ISMessagesList.GetCountAll

Description

This function counts the total amount of the messages.

Syntax

object.GetCountAll()

Part Attribute Type Description
object Required
The object always implements the ISMessagesList interface

Return Value

int

Returns the total amount of the messages.

Example

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

Dim aProvider
Dim aFilter
Dim aPageNumber
Dim aMessages
Dim aMessage
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