Miguel Quirós wrote:

Thank you very much for your answer. As I told, I am not expert in
writing macros and I am just using the things that I can see are used by
the macro recorder (the dispatcher) and try to adapt them to my needs.
From your answer, I deduce that there are methods easier to use than the
dispatcher (.searchString).
Unfortunately, they are not easier, because you need to learn how things work inside of OOo. Many examples are available that can be adapted to the problems that you want to solve. Also, sometimes the macro recorder works for what you want, and sometimes it does not. I have a free macro document that contains many examples (this is different than my book):

http://www.pitonyak.org/AndrewMacro.odt

There are so many resources that I can not easily list them all. There are code snippets with examples:

http://codesnippets.services.openoffice.org/

There is a forum that you can search:

http://www.oooforum.org/

My needs are to search all occurrences of a determinate string in a
document
You did not say why you wanted to search for every occurrence of the string. Ignoring the "replace it" part, here is an example that finds all occurrences:

Take a look at my macro document in section 7.14 titled "Search And Replace". Does this help at all?

and, in some cases just replace it by another simple string (in
which case I see that there is something called .replaceAll that may be
useful and easy to use) and in other cases by something more complicated
like putting a new string with special symbols, superindexes , etc in
it, in this case perhaps .replaceAll cannot do all the work.

As suggested, I am sending this message also to [email protected]


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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

Reply via email to