Accessing an ISearchSchema Object

You access an ISearchSchema object by calling the IBuildCatalog.Schema property, as in the following example, where objSchema is the name you give to the ISearchSchema object:

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSchema 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1") 
Set objBuildServer = objSearchAdmin.BuildServer 
Set objCatalogs = objBuildServer.BuildCatalogs 

For Each objCatalog in objCatalogs 
  Set objSchema  = objCatalog.objSchema 
  ... 
Next

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

© 1997-1998 Microsoft Corporation. All rights reserved.