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
(e-mail address removed)
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.
 

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

Top