You create a new ReplicationServer object by calling the CreateObject method, as in the following example, where ReplServer is the name you give to the new ReplicationServer object:
Option Explicit
On Error Resume Next
dim ReplServer
Set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
...
'Release Server object
set ReplServer = Nothing
After you have access to the ReplicationServer object, you must call the Initialize or InitializeEx method to initialize the object before you can call any of its methods or set or get any of its properties.