Previous in Contents Next in Contents

Accessing an IStoplists Interface Object

You access an IStoplists interface object by calling the ISearchSchema.Stoplists property, as in the following example, where objStoplists is the name you give to the IStoplists interface object:

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildCatalog, objStoplist 

Set objSearchAdmin   = CreateObject("Search.SearchAdmin.1") 
Set objBuildCatalog    = _
  objSearchAdmin.BuildServer.BuildCatalogs("KMSampleCatalog1") 
objBuildCatalog.Schema.Stoplists.Clear 

Set objStoplist = objBuildCatalog.Schema.Stoplists.Add "Noise", _
  "C:\objStoplists\Noise.enu", 9, 1  

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

© 1997-2000 Microsoft Corporation. All rights reserved.