On 12/12/2012 20:14, Ed Bradford wrote:
I would like to ask a question about how to
write a macro that can dynamically discover a table to sort.
Having to define each "range" and each macro to sort each range doesn't
work for me.
I might be missing something, but I simply wanted to ask my question:
How can a Macro dynamically discover the range of data to apply its logic
to?
Ed Bradford
Pflugerville,TX
egbe...@gmail.com
Hi, Ed,
You get a reward for spelling out your problem: a direct answer, instead
of an unfortunate runaround.
Your question belongs on the User Forum[1], but you will probably find
the answers already there, with useful code examples and in much greater
detail than the brief explanation below. If you still need to ask
something, sign up for a forum account (that's DIY).
Writer keeps its tables in a collection, available from the document
object. You can iterate through the collection, looking for tables that
meet your criteria for "needs sorting".
Each table has a collection of rows. That collection has a useful
property, ".getCount()", which returns the number of rows.
Happy sorting!
HTH,
/tj/
[1] http://forum.openoffice.org/en/forum/
(If you distrust emailed links, follow the link in the navigation box,
on the left of every page in the wiki.)