Accessing an ISitePaths Object

You access an ISitePaths object by calling the ISiteRestriction.Paths property, as in the following example, where objPaths is the name you give to the ISitePaths object:

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSites, objSite, objPaths 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1") 
Set objBuildServer = objSearchAdmin.BuildServer 
Set objCatalogs = objBuildServer.BuildCatalogs 
Set objCatalog  = objCatalogs("KMSampleCatalog1")
Set objSites    = objCatalog.objSites
Set objSite     = objSites.Item("Microsoft.com")
Set objPaths    = objSite.objPaths

...

'Release objects 
Set objPaths    = Nothing 
Set objSite     = Nothing 
Set objSites    = Nothing 
Set objCatalog  = Nothing 
Set objCatalogs = Nothing 
Set objBuildServer = Nothing 
Set objSearchAdmin = Nothing 
 

© 1997-1998 Microsoft Corporation. All rights reserved.