Platform SDK: Web Telephony Engine

Listing Servers in the Array

The following example shows how to use the WTE objects to generate a list of servers in the array.

Sub ListServers()
    Set WTE = CreateObject("WTE.Root")
    Set Arrays = WTE.Arrays
 
    arrayname = InputBox("Please enter the array name, or <ENTER> for the first array:")
 
    If arrayname = "" Then
        Set arr = Arrays(1)
    Else
        ' Look for the specified array
        On Error Resume Next
        Set arr = Arrays(arrayname)
 
        If Err.Number <> 0 Then
            MsgBox "The specified array was not found"
            Exit Sub
        End If
    End If
 
 
    Set servers = arr.servers
    output = "Servers in the array:" & vbCrLf
    For Each server In servers
        output = output & server.Name & vbCrLf
    Next
    MsgBox output
End Sub
 
ListServers