Page 1 of 1

Selecting all tables

Posted: 2019-02-12 23:47:04
by Kadah
Is it possible to select all tables in a document? I would like to change text alignment in all the tables in a very long document and it seems that I have to do it one table after another, which takes a lot of time. Is it possible to select them all at once?

Re: Selecting all tables

Posted: 2019-02-13 00:35:36
by adryan
G’day, Kadah et al

Click on a Table to select it.

In the Formatting Examiner Palette, click on the gearwheel at the bottom left, and choose Select All from the drop-down menu that appears.

Cheers,
Adrian

Re: Selecting all tables

Posted: 2019-02-13 02:42:02
by phspaelti
The Formatting Examiner Palette sure has a lot of superpowers 8)

But I'm not sure that this will work for what Kadah is trying to do, though it may depend on the formatting.

Here is a simple macro solution which will select just the tables, i.e., all table cells.

Code: Select all

$doc = Document.active
$doc.setSelection $doc.text.tables

Re: Selecting all tables

Posted: 2019-02-13 10:22:04
by martin
It's true that those methods will produce slightly different kinds of selections. Using the Formatting Examiner in this way will select all tables in their enclosing context (eg: the main document text), while the macro will select all table cells directly. The first method won't allow you to manipulate certain aspects of the tables.

Perhaps the Formatting Examiner should be changed to produce selections of the latter type. I'll make a note of it.
phspaelti wrote:
2019-02-13 02:42:02
The Formatting Examiner Palette sure has a lot of superpowers 8)
Yes indeed! These Formatting Examiner selection commands work with other kinds of special content too, eg: footnote references, images, etc. It's an easy way to select these kinds of things, or traverse the document using the find next/previous buttons in the palette.

Re: Selecting all tables

Posted: 2019-02-13 12:20:19
by Kadah
phspaelti wrote:
2019-02-13 02:42:02
Here is a simple macro solution which will select just the tables, i.e., all table cells.
Thank you! It works perfectly.

Re: Selecting all tables

Posted: 2019-02-13 16:56:16
by writerhoward
Martin,

I think that implementation of your thought that "Perhaps the Formatting Examiner should be changed to produce selections of the latter type" would be very helpful.

Howard