TABLE SELECTION

  • Thread starter Thread starter Subligaria
  • Start date Start date
S

Subligaria

Hi,

Does anyone know of a way to find/select all tables within a Word 2007
document?

In the Find dialog, the Special list does not contain a code for "table".
 
Well, it depends on whether you're actually trying to *select* all tables at
once or navigate from one table directly to the next.

If the latter, use the "Browse by" (round) button sandwiched between the
double arrow buttons at the bottom of the Vertical Scroll Bar, Select Table
from the palette it produces then use the up/down dbl arrows to navigate
from one table to the next.

I know of no feature within the program that provides for selecting all
tables at once - even Ctrl+Clicking or Shift-Clicking manually doesn't
enable selecting multiple tables. Perhaps it can be done programmatically
but I'll leave that to someone who knows whereof they write :-)

Perhaps if you clarify your actual objective there are alternative
suggestions or approaches to be offered.

Regards |:>)
Bob Jones
[MVP] Office:Mac
 
Hi,

Yes, selection is the name of the game. I have a 200-page document where all
the tables need to be given a new Preferred Width. There are scores of tables.

I was just hoping there was some way to select them all in one go. How
idiotic of Word to let you jump to tables via the Browse Object feature while
not letting you find them in the Find dialog.

Thanks for your response.
 
Even worse, Table Properties settings can't be repeated with F4, which would
make it possible to make the settings in the first table, then Browse Next,
F4, Browse Next, F4, and so on. The old Table | Cell Height and Width
dialog is susceptible to F4 but unfortunately doesn't contain a setting for
overall table width, so that's no help, either.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
A simple macro seems the only answer.


Suzanne S. Barnhill said:
Even worse, Table Properties settings can't be repeated with F4, which would
make it possible to make the settings in the first table, then Browse Next,
F4, Browse Next, F4, and so on. The old Table | Cell Height and Width
dialog is susceptible to F4 but unfortunately doesn't contain a setting for
overall table width, so that's no help, either.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
Agreed - try

With ActiveDocument
For i = 1 To .Tables.Count
With .Tables(i)
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 50
End With
Next i

where 50 is a percentage of the window width
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
I have written the macro. You only have to copy it. The link explains what
to do with macro listings.
In order to write your own macros you will have to learn vba. :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Copy it into what?

I've only ever recorded macros. Anything more advanced is terra incognita.
 
Unless my eyes are more tired than I thought, this site didn't display this
info originally...

It is now, though. I've entered the macro into the editor and saved it.
However, running it gives an error telling me to insert an 'end with'
instruction. But this is already present in the macro.

Is this in the wrong place?
 
The web page has not been changed for months. Better not to program Word
while tired ;)

The missing End With error was my fault :o(. Each 'With' statement should
have an 'End With' statement and I had missed one when copying to the
message format. It should go after the last statement and before End Sub
thus:

With ActiveDocument
For i = 1 To .Tables.Count
With .Tables(i)
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 50
End With
Next i
End With

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top