Accessing an IGatherLog Object

You access a specific IGatherLog object by calling the IGatherLogs.Item property. Since IGatherLogs is a collection, you can access all IGatherLog objects using a for each loop, as in the following example, where objLog is the name you give to the IGatherLog object:

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objLogs, objLog 

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

For Each objLog in objLogs
  ...
Next

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

© 1997-1998 Microsoft Corporation. All rights reserved.