Function Get_Purchase_Order(fileName As String) As String
Dim MDoc As MODI.Document
Dim MLayout As MODI.Layout
Dim MWord As MODI.Word
Dim OCRtext As String
Dim p1 As Long, p2 As Long
Set MDoc = New MODI.Document
MDoc.Create fileName
MDoc.Images(0).OCR
Set MLayout = MDoc.Images(0).Layout
OCRtext = ""
For Each MWord In MLayout.Words
OCRtext = OCRtext & " " & MWord.Text
Next
MDoc.Close False
Get_Purchase_Order = ""
p1 = InStr(OCRtext, "Purchase Order:")
If p1 > 0 Then
p1 = p1 + Len("Purchase Order:")
p2 = InStr(p1, OCRtext, "Job Number:")
If p2 > 0 Then Get_Purchase_Order = Mid(OCRtext, p1, p2 - p1)
End If
Set MLayout = Nothing
Set MDoc = Nothing
End Function
Buda belgedeki metnin bir bölümünü alma
meşhur çin atasözü "ACCESS İLE YAPABİLECEKLERİNİZ HAYAL EDEBİLECEKLERİNİZ İLE SINIRLIDIR" siz ne kadar hayal edebiliyorsunuz
Cevapla