Here is the example:
Code: Select all
Sub Test
Dim SearchDesc As Object
Dim Doc As Object
Doc = ThisComponent
SearchDesc = Doc.createSearchDescriptor
SearchDesc.SearchString="turnover"
SearchDesc.SearchSimilarity = True
SearchDesc.SearchSimilarityAdd = 2
SearchDesc.SearchSimilarityExchange = 2
SearchDesc.SearchSimilarityRemove = 2
SearchDesc.SearchSimilarityRelax = False
Found = Doc.findFirst (SearchDesc)
Do Until IsNull(Found)
Found.CharWeight = com.sun.star.awt.FontWeight.BOLD
Found = Doc.findNext( Found.End, SearchDesc)
Loop
End Sub
So is this outdated or is there something else I'm missing?
What I am looking to do is set up a code that will search the contents of the cell and determine if it contains a phrase regardless of capitalization. So if this is outdated, could someone point me in a good direction to achieve this end? Thanks.