Page 1 of 1

selecting text in document by text offsets

Posted: Fri Nov 10, 2006 4:29 pm
by jimbr32
I need to extract all the text from a document, do some processing, and be able to select text in the document based on offsets in the extracted text.

For example, I'd like to do something like call RVGetText.GetAllText, call RVLinear.RVSetSelection using offsets from the text, and apply font styles to the selected text. Text offsets don't match up when I try this.

Processing individual text items may work better, but my text processing needs to see the entire document. Is there a way to do it?

Thanks
Jim

Posted: Fri Nov 10, 2006 10:41 pm
by Sergey Tkachenko
Use RVGetTextRange(rv, 0, RVGetTextLength(rv)) from RVLinear.pas

Posted: Fri Nov 10, 2006 11:27 pm
by jimbr32
Thank you. Thats exactly what I was looking for.

Jim