Language Property
Returns the language identifier for the recognized text. Read-only Long.
expression.Language
*expression * Required. An expression that returns a Layout object.
Remarks
The Language property returns a standard Windows language identifier, for example, 1033 for English (USA). For additional information on language identifiers, please see the "International Features" section of the Microsoft Windows Platform SDK.
Example
The following example loads a document, performs optical character recognition (OCR) on the first page, and then displays information, including the language, about the page's OCR layout.
Sub TestLayoutProperties()
Dim miDoc As MODI.Document
Dim miLayout As MODI.Layout
Dim strLayoutInfo As String
Set miDoc = New MODI.Document
miDoc.Create "C:\document1.tif"
miDoc.Images(0).OCR
Set miLayout = miDoc.Images(0).Layout
strLayoutInfo = _
"Language: " & miLayout.Language & vbCrLf & _
"Number of characters: " & miLayout.NumChars & vbCrLf & _
"Number of fonts: " & miLayout.NumFonts & vbCrLf & _
"Number of words: " & miLayout.NumWords & vbCrLf & _
"Beginning of text: " & Left(miLayout.Text, 50) & vbCrLf & _
"First word of text: " & miLayout.Words(0).Text
MsgBox strLayoutInfo, vbInformation + vbOKOnly, _
"Layout Information"
Set miLayout = Nothing
Set miDoc = Nothing
End Sub
Applies to | Layout Object