Joel Cordeiro wrote (4-10-2008 1:51)
Hi,

i already solved it. Now i have another doubt. I would like to replace the
selected text of the document with another text. How can i do that? I saw
some examples about replace all the ocurrence of a string with another
string, but what i want is just replace the selected string in the document
with another string.

You nee the viewcursor of the document.
And the text object, the insertstring method, and pass the viewcursor as argument.
In OOo-basic
        thisComponent.Text.insertString(oCursor,<your text>,TRUE)
True makes sure the selected text is replaced.

Ciao,
Cor


--
"The Year of 3" -2008- "Het jaar van 3"

Cor Nouws - Arnhem - Netherlands
  > marketing contact - http://nl.OpenOffice.org
  > Zeker van OpenOffice.org - www.nouenoff.nl



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to