Fast Way to Select Set of Rows Within a Word Table

A

Anon Canuck

Thanks in advance

I'm looking for a fast way to select a range of rows of a Word table, knowing the start and end "numbers" of the rows. The Selection.Move... Extend:=... techniques is very slow

Thanks again.
 
J

Jean-Guy Marcil

Hi Canuck!

Have you tried, for example to select rows 3 to 8 in the currently active
table:
'_______________________________________
Dim MyRange As Range

Set MyRange = Selection.Tables(1).Rows(3).Range
MyRange.SetRange MyRange.Start, Selection.Tables(1).Rows(8).Range.End
MyRange.Select
'_______________________________________
?

--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org


Anon Canuck said:
Thanks in advance.

I'm looking for a fast way to select a range of rows of a Word table,
knowing the start and end "numbers" of the rows. The Selection.Move...
Extend:=... techniques is very slow.
 
J

Jezebel

1) It's much faster to avoid the Selection object entirely, if you can. If
possible work only with range objects.

2) The Rows property is not always available: for example, if the table has
vertically merged cells.
 
Top