Previous in Contents Next in Contents

AddDestination Method

This method adds a destination to the project.

Syntax

ReplicationProject.AddDestination(Destination)

Parameters

Destination

Name of the server or route to add to the project.

Remarks

You must have Site Server Publishing administrator privileges on the server to call this method.

Duplicate destination names are automatically eliminated from the list.

Note   If you add a destination that is on the same computer, you cannot replicate files using the ReplicationClient methods.

Example

The following example adds the destination MyDest to the list of destinations.

Option Explicit 
On Error Resume Next

const OPEN_EXISTING_PROJECT  = 2

dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

dim ReplProject
set ReplProject = ReplServer.OpenProject("MyProject", OPEN_EXISTING_PROJECT)

ReplProject.AddDestination("MyDest")

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

EnumDestination, RemoveDestination


© 1997-2000 Microsoft Corporation. All rights reserved.