ChangeOrder Method

This method moves a site up or down in the site restriction list.

Syntax

ISiteRestrictions.ChangeOrder(SiteName, Up)

Parameters

SiteName

The name of the site to move.

Up

If True, Search moves the site up in the list; if False, Search moves it down.

Remarks

If the site is not in the list of sites, Search ignores the request.

Example

The following example moves the site Microsoft.com up in the list, then displays the names of all of the sites in the list.

Option Explicit 
On Error Resume Next 

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

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

objSites.ChangeOrder "Microsoft.com", True 

Wscript.Echo objCatalog.Name & " has the following site restrictions:"

For Each objSite in objSites
  Wscript.Echo "  " & objSite.Name 
Next

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

See Also

ISiteRestriction


© 1997-1998 Microsoft Corporation. All rights reserved.