El mar, 06-06-2006 a las 21:38 -0400, Andrew Douglas Pitonyak escribió:
> 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
> 

Thank you again. I hava had a quick look and it looks like a magnificent
work (I imagine that the book will be even more magnificent). I will
need to find some time to grab at least the fundamentals of what it is
said here.

> 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?
> 

At first sight, I think I have found something useful. The result of
findFirst used as result.end can be used for findNext as starting point
to find the next occurence. Anyway, it is clear I would need to find
time to learn more, not easy ...

In any case, thanks a lot for your help.

> >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]
> >
> >  
> >
> 
-- 
Miguel Quirós Olozábal
Departamento de Química Inorgánica. Facultad de Ciencias.
Universidad de Granada. 18071 Granada. SPAIN
email:mquiros<at>ugr<dot>es
      mquiros<arroba>ugr<punto>es

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

Reply via email to