Add Method

This method adds an extension to the list.

Syntax

IExtensions.Add(Extension)

Parameters

Extension

The filename extension to add to the list of extensions to crawl or avoid.

Example

The following example adds the TMP extension to the list of filename extensions to avoid for the KMSampleCatalog1 catalog definition.

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objExtensions, objExtension 

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

objExtension = objExtensions.Add("TMP") 
objExtension.IncludedExtension = False 

'Release objects 
Set objExtension  = Nothing 
Set objExtensions = Nothing 
Set objCatalog    = Nothing 
Set objCatalogs   = Nothing 
Set objBuildServer   = Nothing 
Set objSearchAdmin   = Nothing 
 

See Also

Remove


© 1997-1998 Microsoft Corporation. All rights reserved.