Previous in Contents Next in Contents

Accessing an ICatalogSearchServerList Interface Object

You access an ICatalogSearchServerList interface object by calling the IBuildCatalog.SearchServers property, as in the following example, where objSearchServers is the name you give to the ICatalogSearchServerList interface object:

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildCatalog, objSearchServer 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")

For Each objBuildCatalog IN objSearchAdmin.BuildServer.BuildCatalogs
  If objBuildCatalog.SearchServers.Count > 0 Then
    Wscript.Echo "Catalog " & objBuildCatalog.Name & " is propagated to:"

    For Each objSearchServer in objBuildCatalog.SearchServers
      Wscript.Echo "  " & objSearchServer.Name
    Next

    Wscript.Echo ""
  End If
Next

'Release objects
Set objSearchServer   = Nothing 
Set objBuildCatalog  = Nothing 
Set objSearchAdmin = Nothing 
 

© 1997-2000 Microsoft Corporation. All rights reserved.