I know that there is Java but for the new version.
In any case, I also tried with CreateWordHilite for the second list but nothing.
Using CreatePageHilite and setting the "hiliteListOk.Add 113, 1" the result should be one character for the item no. 113 = "1" ... but the result is always "1234"
There could be something that doesn't work.
the string to search is "1234/5" which is a string coming from a text document transformed in pdf.
The first CreateWordHilite (the one for the whole document) finds the string correctly, in fact the routine stops with the "IF" and performs the second CreateWordHilite, the one with only on item.
See below :
***************************************************
hiliteList.Add 0, 32767
Set wordHilite = pdPage.CreateWordHilite(hiliteList)
For idx = 0 To wordHilite.GetNumText - 1
'taking the word for searching
word = Trim(wordHilite.GetText(idx))
If word = wordFind Then
Debug.Print wordToHilite.GetText(idx)
Exit For
End If
Next
******************************************************* The Debug.print in this routine gives result "1234/5" with idx = 113
hiliteList.Add 113, 1
Set wordHilite = pdPage.CreateWordHilite(hiliteList)
Debug.Print wordToHilite.GetText(0)
***************************************************** this debug.print should give the same result of the former one becuase I try to reach the item without looping, but it's not so. Here the result is "zzzz"
If I want to get the same result with these instructions I must give this "hiliteList.Add 141, 3"
Giving this item to the function GetBoundingRect and setting the selection I get the highlight without problems, but with a different index.
It seems like that the whole document highlight takes the string "1234/1" as one word instead of the second that takes the string as it were splitted in 3 parts : "1234" "/" "5"
The function is always the same and so I can't understand which is the difference.