DiscussionServers Collection Object

              Properties       Methods      

Global object
DiscussionServers collection (DiscussionServer object)
Discussions collection (Discussion object)

A collection of DiscussionServer objects that represent discussion servers in the Microsoft Office host application.

Using the DiscussionServers Collection

Use the DiscussionServers method of the Global object to return the DiscussionServers collection for all discussion servers registered on the computer being used. The following example returns the DiscussionServers collection and displays a message box showing the number of servers in the collection.

Dim dscDiscussionServersCollection As DiscussionServers
Set dscDiscussionServersCollection = DiscussionServers
MsgBox dscDiscussionServersCollection.Count

Use the Add method to add a new discussion server to the collection. The following example adds a new discussion server with the friendly name "Sample Server" and the Uniform Resource Locator (URL) http://samples.microsoft.com.

Dim dscServers As DiscussionServers
Set dscServers = DiscussionServers
dscServers.Add "Sample Server", _
    "http://samples.microsoft.com/"

Use DiscussionServers(Index), where Index is the index number of the specified discussion server, to return a single DiscussionServer object. The following example sets the variable dscAccounting to the third server in the DiscussionServers collection.

Set dscAccounting = dscServers(3)