Success = Window("Adobe Acrobat Pro").WinObject("AVPageView").GetTextLocation("Tex t to be Searched", l, t, r, b)
I know it finds the text since Success comes back True. But my l, t, r and b are always the same numbers no matter what text I search for on the page. My l and t are always 0 and r is always 966 and b is always 626. The text I'm searching for is inside a pdf document but that shouldn't matter since the GetTextLocation should give the l,t,r and b based on the screen.
I have used Dani's Accessing PDF doc to some use but from what I can see the doc doesn't list any methods about getting the X,Y or the L,T,R,B for text that's been selected.
I'm open to any solution...all I'm trying to do is a Left Click on any part of the word that's been selected (after it's been searched) inside of a PDF document.
Any suggestions for my question in the post? Has someone encountered a situation with GetTextLocation method where it always returns the same numbers for Left, Top, Right and Bottom and what did you do to resolve this issue?
Would appreciate any suggestions/ideas on how to resolve the issue on hand.
The problem is that text searched using such approach is usually in windows controls and not a PDF. PDF can different way of painting text, making this approach a failure.