Accessing IStartPage Objects

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

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objStartPages, objStartPage 

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

For Each objStartPage in objStartPages
  ...
Next

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

© 1997-1998 Microsoft Corporation. All rights reserved.