Hmm, I donβt know if it can be done inside a user module. When writing a custom module, you usually use the Kofax Capture optimized user module API (DBLiteOpt.dll). I know that you can create an empty batch with a custom module using the BatchCreate method of the RuntimeSession object:
'*** Get your Process Id
pid = m_oLogin.ProcessId '*** Create new batch
Set m_oBatch = m_oRuntimeSession.BatchCreate("SomeBatchClass", "MyBatch", pid)
, , .
, . #:
Kofax.AscentCaptureModule.ImportLogin myLogin ;
Kofax.AscentCaptureModule.Application myApp;
myLogin = new Kofax.AscentCaptureModule.ImportLogin() ;
myApp = myLogin.Login("myUsername", "myPassword") ;
Kofax.AscenCaptureModule.BatchClass myBatchClass =
myApp.BatchClasses["MyBatchClassName"];
Kofax.AscentCaptureModule.Batch =
myApp.CreateBatch(ref myBatchClass, "TheNameOfMYBatch");
Kofax.AscentCaptureModule.Document myDoc ;
Kofax.AscentCaptureModule.Page myPage = null ;
myDoc = myBatch.CreateDocument(null) ;
Kofax.AscentCaptureModule.FormType myFormType =
myBatch.FormTypes[1]
myDoc.set_FormType(ref myFormType) ;
Kofax.AscentCaptureModule.Pages myPages = myBatch.ImportFile("SomeFilePath") ;
foreach(Kofax.AscentCaptureModule.Page myPage in myPages)
{
myPage.MoveToDocument(ref myDoc, null) ;
}
myApp.CloseBatch() ;