Dim lst As WinForm.ListBox lst = e.Form.Controls("ListBox1") For i As Integer = 0 To lst.Items.Count - 1 Dim doc = CreateObject("MODI.Document") doc.Create(lst.items(i)) doc.OCR(2052, True, True) For ii As Integer = 0 To doc.Images.count - 1 Dim layout = doc.images(ii).Layout output.show(layout.text) Next doc.close doc = Nothing Next