End of Cell call command

D

Dave

Is there a command to position the insertion point at the
end of a table cell?

TIA,
Dave
 
D

Doug Robbins - Word MVP

Hi Dave

Use the following:

Dim arange as range
Set arange = ActiveDocument.Tables(1).Cell(1,1).Range
arange.Start=arange.end
arange.Select

However, try to use the .Range object rather than select the range. Your
code will run quicker as it does not then have to move the selection to that
point.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
H

Helmut Weber

Hi Dave,
as at least with word 97 and on my computer
doug's example places the cursor at the beginning
of the next cell, You might also like to try this:

ActiveDocument.Tables(1).Cell(1, 1).Select
Selection.EndKey

Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
 
D

Doug Robbins - Word MVP

Oops, missed line. It should have been

Dim arange As Range
Set arange = ActiveDocument.Tables(1).Cell(1, 1).Range
arange.End = arange.End - 1
arange.Start = arange.End
arange.Select

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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