Count Property

This read-only property specifies the number of extensions in the list.

Syntax

IExtensions.Count

Example

The following example displays the number of extensions in the list for the KMSampleCatalog1 catalog definition.

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objExtensions, ExIncludes 

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

If objExtensions.IncludedExtension Then
  ExIncludes = " includes" 
Else
  ExIncludes = " excludes" 
End If 

Wscript.Echo objCatalog.Name & ExIncludes & objExtensions.Count 
  & " filename extensions." 

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

See Also

Add, Remove


© 1997-1998 Microsoft Corporation. All rights reserved.