Search code examples
vb.netvbaautomationkofax

KoFax Automation with VBA


I've seen this Has anyone used Kofax Capture API for creating a Importer to create a batch in Kofax, but it didn't work out for me.

I'm trying to automate creating a batch and maybe validating a batch from vba(ideally vb.net after).

Is there any sample code to assist me in the right direction? Almost everything I searched lead me to a contractor for hire or licensed software. I tried figuring it out myself through trial and error but I couldn't even connect to a Kofax session.

Dim oFax As ACDB.RuntimeSession
Dim oBatch As ACDB.Batch
Dim pax As ACDB.Process
Dim lFax As ACDB.Login

Set lFax = New ACDB.Login
Set oBatch = oFax.BatchCreate("Test", "Test", 0)
MsgBox (oBatch.Name)

Solution

  • Sample code that shows how to create batches is installed with Kofax Capture. You should find it in CaptureSV\Source\Sample Projects\InpScrpt\Simple.

    If you decide not to write your own:

    • The current Kofax offering in this area is Kofax Import Connector.
    • KIC product replaces previous separate products "Kofax Import Connector - Folder" and "Kofax Import Connector - XML" (AKA XML Auto Import). However, even though it is deprecated as of KC 10.1, XML Auto Import is still included with KC for free (run "ACXMLAI.EXE -GUI" to open). Starting something new with a deprecated product is not a great idea, but it's there and it's free.
    • As Brandon mentions in a comment, Kofax partners have products that might suit your needs.

    Validation script is a whole different area. In Kofax Capture Administration, right-click on your document class and choose Document Validation Script which will allow you to create a validation script in VB.NET or SBL (deprecated).