This method either opens an existing project or creates a new project.
Syntax
ReplicationServer.OpenProject(Project, ProjectFlag)
Parameters
Project
The name of the project to open.
ProjectFlag
Whether to open an existing project or create a new project. Use one of the following values.
Project Flag | Value | Description |
CREATE_NEW_PROJECT | 1 | Creates a new project |
OPEN_EXISTING_PROJECT | 2 | Opens an existing project |
Remarks
Note
Content Deployment sets the ReplicationProject.Name property to the Project argument that you use when ProjectFlag is CREATE_NEW_PROJECT.
Example
The following example opens the existing project Project2.
Option Explicit
On Error Resume Next
const OPEN_NEW_PROJECT = 1
const OPEN_EXISTING_PROJECT = 2
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim Project
set Project = ReplServer.OpenProject("Project2", OPEN_EXISTING_PROJECT)
...
'Release objects
set ReplProject = Nothing
set ReplServer = Nothing
See Also