Creating a ReplicationSchedule Object

You create a new ReplicationSchedule object by calling the ReplicationProject.AddSchedule method, as in the following example, where ReplSched is the name you give to the new ReplicationSchedule object:

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)

dim ReplSched
set ReplSched = ReplProject.AddSchedule
...

'Release objects
set ReplSched   = Nothing
set ReplProject = Nothing
set ReplServer  = Nothing

© 1997-1998 Microsoft Corporation. All rights reserved.