Creating an ISearchCatalog Object

You create an ISearchCatalog object by calling the ISearchCatalogs.Add method, as in the following example, where KMSampleCatalog1 is the name of the catalog:

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objSearchServer, objCatalogs, objCatalog 

Set objSearchAdmin  = CreateObject("Search.SearchAdmin.1")
Set objSearchServer = objSearchAdmin.SearchServer
Set objCatalogs  = objSearchServer.SearchCatalogs
Set objCatalog   = objCatalogs.Add("KMSampleCatalog1")

... 

'Release objects 
Set objCatalog   = Nothing 
Set objCatalogs  = Nothing 
Set objSearchServer = Nothing
Set objSearchAdmin  = Nothing 
 

© 1997-1998 Microsoft Corporation. All rights reserved.