Creating an IBuildCatalog Object

You create a new IBuildCatalog object by calling the IBuildCatalogs.Add method, as in the following example, where KMSampleCatalog1 is the name of the catalog:

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildServer = objSearchAdmin.BuildServer
Set objCatalogs    = objSearchServer.BuildCatalogs
Set objCatalog     = objCatalogs.Add("KMSampleCatalog1", _
    "C:\Catalogs)

... 

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

© 1997-1998 Microsoft Corporation. All rights reserved.