This event is fired at least once for every document collected in JobDocumentRetrieve. INVOICES puts the result from the interpretation/import in Status and the result from the identification in Identification.
Public Function JobDocumentComplete(Status As Long, Identification As Long) As Long
|
Status |
0 – The document was recognized. This parameter has no significance in INVOICES. (It is left over from FORMS implementation.) |
|
Identification |
2 – Invoice identified. |
Interpret Application or InterpretApp
Invoice (OLE) or Invoice (COM API)
|
evtOK |
Normal return. |
|
evtOKAbort |
No effect – treated the same as evtOK. |
|
evtError |
Causes an error message and job termination |
Used when is selected as the source in the job description. Depending on the Identification value, decide what to do next – for example send another document to Interpret, end the job, or move the image files.
You can use this event to move the image file(s) associated with the invoice after interpretation. The sample VB6 code below shows how to alter the search paths for the image files of the current invoice.
Public Function OnJobDocumentComplete(typeCode As Integer, idNum As Integer) As Long
Dim obInvoice As Invoice
Set obInvoice = m_App.CurrentInvoice
Dim obPage As InvoicePage
Set obPage = obInvoice.Pages(1)
' TODO: Move the file in the file system
obPage.ImageFileName(eiFrontPage) = "\\imgserv1\INVOICES\Processed\Page01.tif"
OnJobDocumentComplete = EHICOM.evtOK
End Function
Used by ReadSoft EMAIL and ReadSoft COLLECTOR. (Note: ReadSoft EMAIL is not supported with INVOICES 5-6.)