Previous in Contents Next in Contents

Accessing an IMappings Interface Object

You access an IMappings interface object by calling the IBuildCatalog.Mappings property, as in the following example, where objMappings is the name you give to the IMappings interface object:

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildCatalog, objMappings 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildCatalog  = _
  objSearchAdmin.BuildServer.BuildCatalogs("KMSampleCatalog1")

objBuildCatalog.Mappings.Add "C:\InetPub\wwwroot", _
  "http://www.microsoft.com" 

' See Creating and Accessing IMapping Interface Objects 

'Release objects
Set objMapping  = Nothing 
Set objBuildCatalog  = Nothing 
Set objSearchAdmin = Nothing 
 

© 1997-2000 Microsoft Corporation. All rights reserved.