' Точка входа. Dim LoginPoint As SBLogon.LoginPoint ' Приложение. Dim DirectumApplication As sbrte.Application ' Параметры соединения с использованием кода системы. ConnectionParams ="SystemCode=DIRECTUM" ' Получить приложение, используя точку входа. Set LoginPoint = New SBLogon.LoginPoint Set DirectumApplication = LoginPoint.GetApplication(ConnectionParams) Dim TaskFactory As sbrte.ITaskFactory Dim Task As sbrte.ITask Dim RootFolders As sbrte.IContents Dim OutBoxFolder As sbrte.IFolder ' Получить задачу. TaskID = 272730 Set TaskFactory = DirectumApplication.TaskFactory Set Task = TaskFactory.Copy(TaskFactory.GetObjectByID(TaskID)) ' Получить папку "Исходящие". Set RootFolders = DirectumApplication.FolderFactory.RootFolders Do While Not RootFolders.EOF And RootFolders.Value.FolderType <> ftOutbox RootFolders.Next Loop Set OutBoxFolder = RootFolders.Value.Folder ' Поместить ссылку на задачу в папку "Исходящие". InsertedCount = DirectumApplication.FolderFactory.PasteToFolder( _ OutBoxFolder.Info, Task.Info) |