VBA event handlers

An event handler that executes VBA functions is one of the four types of event handlers that you can define for Kofax ReadSoft Invoices.

VBA functions can access information from the current context. For example, when Kofax ReadSoft Invoices is interpreting a particular invoice, a function can access individual fields on the invoice, the invoices itself, and some information from the invoice profile. Other invoices in the database are inaccessible.

When a VBA function is called, the block of code associated with the event handler is compiled and the function is called. VBA functions can call other VBA functions and can fire events of their own.

The internal VBA engine provides many features that can be used to customize Kofax ReadSoft Invoices. In addition to traditional language constructs, you can create dialogs, manipulate files, communicate using ActiveX automation, call functions in DLLs, and call several of the functions provided by the Win32 API.

What you cannot use the internal VBA engine for is advanced window handling, socket programming (Internet), and database communication (such as ODBC). For database communication, consider using an external event server object, a plug-in, or calling DLL functions. You can also let the event handlers communicate with ActiveX objects that implement the required functionality.