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 machine, you cannot replicate files using the ReplicationClient methods.

Example

The following example add 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-1998 Microsoft Corporation. All rights reserved.