Working with Format Settings (SCBCdrFormatSettings)
This class provides methods and properties to specify the format settings.
Sample code
The following sample code searches for the word Invoice or a very similar/misspelled word in the workdoc by using the Levenshtein algorithm. If the word is found, the variable InvoiceFound is set to true.
Dim FormatSettings As SCBCdrFormatSettings
Dim FormatEngine as SCBCdrFormatEngine
Dim strStringFound as string
Dim lngWordID as long
Dim InvoiceFound as Boolean
Set FormatSettings = New SCBCdrFormatSettings
FormatSettings.AddFormat("Invoice")
FormatSettings.CompareType(0) = CdrTypeLevenShtein
FormatSettings.AnalysisMethod(0) = SCBCdrFormLib.CdrAnalysisString
FormatSettings.MaxWordCount = 4
FormatSettings.MaxWordGap= 5.00
FormatSettings.MaxDistance = 0.35
FormatSettings.CaseSensitive = False
FormatSettings.MaxWordLen = 150
If FormatEngine.FindStringFirst(pWorkdoc, FormatSettings,,strStringFound,lngWordID) Then
InvoiceFound = true // The word "Invoice" was found on the document
else
InvoiceFound = false // The word "Invoice" was not found on the document
end if